码迷,mamicode.com
首页 > 其他好文 > 详细

“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

时间:2016-06-10 20:21:04      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:

#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);
}

}

}

“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

标签:

原文地址:http://www.cnblogs.com/qinanzi/p/5574139.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!