0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-14 04:58:49 +00:00
OI-codes/AcWing/720/720.cpp

20 lines
230 B
C++
Raw Normal View History

#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;
}