below give code is for samer08f spoj or feynman spoj.
please don't just copy the code understand it .If u want to i didn't have any problem.
please don't just copy the code understand it .If u want to i didn't have any problem.
#include<stdio.h> int main() { int a; while(scanf("%d",&a)) { if(a==0) break; int sum; sum=(a*(a+1)*(2*a+1))/6; printf("%d\n",sum); } return 0; }
No comments:
Post a Comment
Your comment is valuable to us