谎言君_liar @ 2017-10-22 14:13:22
#include<bits/stdc++.h>
using namespace std;
int main(){
double k,p=0;
int n;
cin>>k;
for(double i=1;i<=10000000;i++){
n++;
p+=1.00000000/i;
if(p>k){cout<<n;break;
}
}
}
by rts_GOD @ 2017-10-22 22:43:19
int n后面加个=0就行了