juruojjl_ @ 2018-12-22 21:09:10
using namespace std; int main() { int k,n=1; double s; cin>>k; while(s<k) { s+=1/n; n++; } cout<<n; return 0; }
by BCZSX @ 2018-12-22 21:14:11
1/n要改成1/(double)n
by Ex90r @ 2019-01-18 18:32:54
希望更丰富的展现?使用Markdown
by Ex90r @ 2019-01-18 18:34:43
戳这里
by superB @ 2019-02-02 09:24:22
我的也是,什么问题??