0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 03:28:48 +00:00
OI-codes/AcWing/720/720.cpp

20 lines
230 B
C++

#include <bits/stdc++.h>
using namespace std;
int a, n, ans;
int main() {
cin >> a;
while (cin >> n, n <= 0) {}
for (int i = 0; i < n; i++) {
ans += i + a;
}
cout << ans << endl;
return 0;
}