“What a boring world!” Julyed felt so bored that she began to write numbers on the coordinate paper. She wrote a “0” on the center, then wrote the follow numbers clockwise, which looked like a snake a

#include<math.h>
#include<stdio.h>
int main()
{
int a,b;
int s;
int t;
while(scanf("%d",&a)!=EOF)
{
int i;
for(i=0;i<a;i++){
scanf("%d",&b);
s=pow(b+b+1,2);
t=s-(b+b+1)-(b+b+1)/2;
printf("%d\n",t);
}

}

}

posted @ 2016-06-10 19:59  师庆禄  阅读(191)  评论(0编辑  收藏  举报