全红
查看原帖
全红
914257
lztz0503楼主2023/8/28 13:04
#include <bits/stdc++.h>
using namespace std;
int n,cnt;
int i = 1;
int main(){
    cin >> n;
    while(n < cnt){
        cnt += 1 / i;
        i += 1;
    }
    cout << i;
    return 0;
}

完全看不出代码哪里有问题的蒟蒻来讨论去求教了

题目传送门

2023/8/28 13:04
加载中...