被这道题卡了好久,我是废物呜呜呜QAQ
#include <iostream>
#include <stdio.h>
int main() {
int a, n;
scanf("%d%d", &a, &n);
while (n <= 0) {
scanf("%d", &n);
}
int sum = 0;
for (int i = 0; i < n; i++) {
sum += a++;
}
printf("%d", sum);
}