TLE#1#2#3#4
查看原帖
TLE#1#2#3#4
1323415
wky_wsy_楼主2024/10/10 23:02

其实挺正常的

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,z=1,c=0;
    cin>>n;
    while(n!=z){
        if(z*z<=n){
            z*=2;
            c++;
        }
        else{
            z++;
            c++;
        }
    }
    cout<<c;
    return 0;
}
2024/10/10 23:02
加载中...