#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; }
ZOJ Problem Set - 1730 Crazy Tea Party,布布扣,bubuko.com
ZOJ Problem Set - 1730 Crazy Tea Party
原文:http://www.cnblogs.com/Alandre/p/3654988.html