#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
long long pizza, ans=0;
while(scanf("%lld", &pizza)==1)
{
if(pizza<0)
{
break;
}
ans= ((pizza*(pizza+1))/2)+1;
printf("%lld\n", ans);
}
return 0;
}
#include <stdio.h> #include<string.h> int main() { char* country = "Bangladesh"; char* country2; ...
No comments:
Post a Comment