Pages

Sunday 9 September 2012

UVA - 913 - Joana and the Odd Numbers

#include <stdio.h>

int main()
{
    long x=0;
    while(scanf("%ld",&x)==1){
        long sum=6*(x/2)*(x/2)+12*(x/2)-3;
        printf("%ld\n",sum);
    }
    return 0;
}

No comments:

Post a Comment