| 记录编号 | 457793 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1413.[NOIP 2002PJ]级数求和 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.011 s | ||
| 提交时间 | 2017-10-09 15:49:21 | 内存使用 | 0.29 MiB | ||
#include<cstdio>
using namespace std;
int n,ans;
double tmp;
int main()
{
freopen("p1.in","r",stdin);
freopen("p1.out","w",stdout);
scanf("%d",&n);
for(;tmp<=n;tmp+=1.0/++ans);
printf("%d",ans);
return 0;
}