FZU 1002 HangOver(简单题目)
2016-03-06 22:49
363 查看
题目网址:http://acm.fzu.edu.cn/problem.php?pid=1002
本题真的很简单,没什么好说的,直接附上AC代码。
本题真的很简单,没什么好说的,直接附上AC代码。
#include<cstdio> int main() { double num; while(~scanf("%lf",&num)) { if(num==0)break; double sum=0; int s=0; for(double i=2;i<=50000;i++) { s++; sum+=(1/i); if(sum>=num) { printf("%d card(s)\n",s); break; } } } return 0; }
相关文章推荐
- UVA 11090(p333)----Going in Cycle!!
- CodeForces 598D Igor In the Museum【dfs】
- 用Category给类中添加属性
- Django URL传递参数的方法总结
- HDU 3903 Trigonometric Function
- CF 598D. Igor In the Museum【DFS】
- 读mongoose api 记录
- DeepLearning--Part3--Chapter16:Representation Learning(1) categories:
- Codeforces 598D Igor In the Museum(bfs)
- Multi-digits Recognition Using ConVNet on Mobile categories:
- beego操作session
- Igor In the Museum(搜搜搜151515151515******************************************************1515151515151515151515)
- 不挂vp_n,不修改host访问google
- CodeForces 598D-Igor In the Museum【DFS】
- Ubuntu14.04下,GO语言的安装!
- Ubuntu14.04下,GO语言的安装!
- HDU 1847 Good Luck in CET-4 Everybody!
- golang tree 辅助操作
- golang中的坑
- 设计模式-命令模式(Go语言描述)