ZOJ Problem Set - 1730 Crazy Tea Party

#include<cstdio>
int main(){
    int T,n;
    scanf("%d",&T);
    while(T--){
        scanf("%d",&n);
        printf("%d\n",n/2*(n/2-1)/2+(n-n/2)*(n-n/2-1)/2);
    }
    return 0;
}

 

posted @ 2014-04-09 20:07  子木聊出海  阅读(240)  评论(0编辑  收藏  举报