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;
}

相关文章
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
88 0
ZOJ - Problem Set - 3960 What Kind of Friends Are You?
ZOJ - Problem Set - 3985 String of CCPC
ZOJ - Problem Set - 3985 String of CCPC
102 0
ZOJ Problem Set - 3758 素数
ZOJ Problem Set - 3758 素数
102 0
|
机器学习/深度学习 人工智能 BI
ZOJ Problem Set - 3758 素数
Singles’ Day Time Limit: 2 Seconds Memory Limit: 65536 KB Singles’ Day(or One’s Day), an unofficial holiday in China, is a pop cu...
928 0
|
存储 算法 索引
ZOJ 3505. Yet Another Set of Numbers 解题报告
    ZOJ 3505:Yet Another Set of Numbers     地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3505       题意:有一个数字集合,集合中的数遵循以下规则:       ( 1 ).
928 0