PersonalCorpus 版 (精华区)
1245716 Big Guava ... 10276 Accepted
0:00.002 64 2002/11/18 06:23:49.912
void main()
{
#ifndef ONLINE_JUDGE
freopen("inputH.txt","r",stdin);
freopen("outputH.txt","w",stdout);
#endif
int tot,i,sum[51];
sum[1]=1;
for (i=2;i<51;i++) sum[i]=sum[i-1]+(i+1)/2*2;
scanf("%d\n",&tot);
while (tot>0) {
tot--;
scanf("%d",&i);
printf("%d\n",sum[i]);
}
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.808毫秒