View Code of Problem 31

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;

int main()
{
    long long sum;
    int n;
    while(scanf("%d",&n) != EOF)
    {
        sum = 23;
        sum = sum + (n-1)*3*5*7;
        printf("%lld\n",sum);
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 31