/////////////////////////////////////////////////////////////////
//2353292     2010-11-18 21:47:39     Accepted     1239     C     0     160     VRS
//1239 柱子放球 找规律题 留意最底层,导出规律就行
#include<stdio.h>
#include<math.h>

 

int main()
{
    int testcase,N;
    int res;
    scanf("%d", &testcase);
    while(testcase--)
    {
        scanf("%d",&N);
        res=(int)pow((double)N+1,(double)2)/2-1; //如果2之前不加上(double),就过不了。。。- -
        printf("%d\n",res);
    }
    return 0;
}

posted on 2010-11-23 14:12  VRS  阅读(198)  评论(0编辑  收藏  举报