码迷,mamicode.com
首页 > 其他好文 > 详细

YYH的王国

时间:2017-06-04 18:28:50      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:stream   while   return   main   name   using   include   --   ace   

#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同意,禁止转载,侵权者必究。

YYH的王国

标签:stream   while   return   main   name   using   include   --   ace   

原文地址:http://www.cnblogs.com/Yzyet/p/6940971.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!