10分钟完成此题
#include<iostream>
using namespace std;
int main()
{
//freopen("xxx.in","r",stdin);
//freopen("yyy.out","w",stdout);
int A,N;
cin >> A >> N;
int sum=A;
while(N<=0)
cin >> N;
for(int i=1;i<N;i++)
sum=sum+(A+i);
cout << sum;
//fclose(stdin);
//fclose(stdout);
return 0;
}