许豪 @ 2017-02-08 18:16:23
#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
int k;
float n=1,i=1;
cin>>k;
while(i<=k)
{
n++;
i=i+1/n;
}
cout<<n;
return 0;
}
by wdnscwj @ 2017-02-09 09:26:16
你渣渣
by 洛洛lglglg @ 2017-02-12 17:18:44
将float改为double,更精确。别问我为什么?我渣渣