/* CODEMAN
Arif Khan Nihar
Problem - Not Easy But Not Hard
*/
using namespace std;
int main()
{
int n;
long long int k,ans;
cin >> n;
while( n-- ) {
ans = 0;
cin >> k;
ans = ( k* ( k + 1 )) / 2;
cout << ans << endl ;
}
return 0;
}
Arif Khan Nihar
Problem - Not Easy But Not Hard
*/
#include<bits/stdc++.h> |
int main()
{
int n;
long long int k,ans;
cin >> n;
while( n-- ) {
ans = 0;
cin >> k;
ans = ( k* ( k + 1 )) / 2;
cout << ans << endl ;
}
return 0;
}
No comments:
Post a Comment