#include <bits/stdc++.h>
using namespace std;
int main() {
int k, total = 0, i = 1;
scanf("%d", &k);
while (k) {
for (int j = 1; j <= i; j++)
if (k > 0)
total += i, k--;
else {
printf("%d\n", total);
return 0;
}
i++;
}
printf("%d\n", total);
return 0;
}
P2669(金币)
最新推荐文章于 2023-03-30 17:51:38 发布