返回小组 开始 2025-05-14 00:00:00

bq

结束 2025-05-14 23:00:00
Contest is over.
当前 2025-06-04 12:12:57

7777y77

include

using namespace std;

int main() {

int a = 0, k, b = 0;
cin >> k;
for (int i = 1;; i++) {
	for (int j = 1; j <= i; j++) {
		a += i;
		b += 1;
		if (b == k) {
			cout << a << endl;
			return 0;
		}
	}
}

}


0923bmy  •  20天前

比赛已结束。