题解:P16306 [蓝桥杯 2026 省 Java/Python 研究生组] 读书计划
题目思路
根据题意模拟,写一个 for 循环,
AC Code
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n = 2026;
//cin >> n;
int i;
for (i = 1; n > 0; i++)
n -= (i % 7 + 1 <= 5 ? 5 : 15);
cout << i << '\n';
return 0;
}