| 记录编号 | 175101 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1413.[NOIP 2002PJ]级数求和 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.021 s | ||
| 提交时间 | 2015-08-04 16:32:40 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
freopen("p1.in","r",stdin);
freopen("p1.out","w",stdout);
long k,i;
cin>>k;
double s=0.0;
for(i=1;s<=k;i++)
s=s+1.0/i;
cout<<i-1;
return 0;
}