PersonalCorpus 版 (精华区)
15896
2002-05-11 12:16:03
Accepted
1239
C++
00:00.00
384K
Big Guava
int main()
{
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.700毫秒