提交时间:2024-10-27 08:20:41
运行 ID: 54283
#include<bits/stdc++.h> using namespace std; int main(){ int day, money = 0; cin >> day; for(int i = 1; i <= day; i++){ if(day < i){ money += day * i; break; } day -= i; money += i * i; } cout << money; return 0; }