#include <iostream>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
int sum=0;
if(n%2==0)
sum=n/2*(n+1);
else
sum=(n+1)/2*n;
cout<<sum<<endl;
cout<<endl;
}
}
1001杭大oj Sum Problem
最新推荐文章于 2021-11-04 14:54:05 发布