4 条题解
-
2
一点都不详细版(你!又在给我差评!)😕
#include <bits/stdc++.h> using namespace std; int main() { int day, nowday, money; cin >> day; nowday = money = 0; for (int i = 1;; i++) { for (int j = 1; j <= i; j++) { money += i; nowday += 1; if (nowday == day) break; } if (nowday == day) break; } cout << money; return 0; }
- 1
信息
- ID
- 91
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 78
- 已通过
- 50
- 上传者