View Code of Problem 31

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n,i,k;
	while(cin>>n)
	{
	 i=1; 
	 k=23;
		while(i<n)
		{
			k+=5*3*7;
			i++;
		}
		cout<<k<<endl; 
	 } 
	 return 0;
	 }

Double click to view unformatted code.


Back to problem 31