UVA Solution
Programming Contest Problems and Solutions
Sunday, May 20, 2012
UVA Solution for 913
//913
#include <stdio.h>
int main()
{
long int n,sum,odd;
while(scanf("%ld",&n)==1)
{
odd=(n*(n+2))/2;
sum=(3*odd)-6;
printf("%ld\n",sum);
}
}
Newer Post
Older Post
Home