The_joker @ 2017-10-02 15:56:00
#include<iostream>
using namespace std;
int main()
{
int k,n,sn;
cin>>k;
sn=1;
int i=1;
while(sn<=k)
{
sn+=1/i;
i+=1;
if(sn>k)
cout<<i;
}
return 0;
}
by Captain_Paul @ 2017-10-02 16:20:45
存储总和的类型应该是double