mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-05 02:46:27 +00:00
20 lines
230 B
C++
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;
|
|
}
|