#include<iostream>
#include<cstdio>
using namespace std;
unsigned long long n;
int main()
{
    int T;
    cin>>T;
    while(T--){
        cin>>n;
        cout<<n*(n+1)/2-1<<"\n";
    }
    return 0;
}

本文由Yzyet编写,网址为www.cnblogs.com/Yzyet。非Yzyet同意,禁止转载,侵权者必究。

posted on 2017-06-04 16:40  Yzyet  阅读(114)  评论(0编辑  收藏  举报