pku 1003
2010-06-16 20:14
288 查看
Source Code
Source Code
Problem: 1003 | User: cug_fish2008 | |
Memory: 292K | Time: 0MS | |
Language: C++ | Result: Accepted |
#include <iostream> using namespace std; class Node { public: Node(){f=0.00;} public: float f; Node *next; }; int main() { Node *start,*pass; pass=new Node; start=pass; float fm; do { cin>>fm; pass->f=fm; pass->next=new Node; pass=pass->next; }while(fm!=0.00); while(start->f!=0.00) { int i=0; float sum=0.00; int n=2; for(;start->f>sum;i++) { sum+=1.00/n;n++; } cout<<i<<" card(s)"<<endl; start=start->next; } return 0; }
相关文章推荐
- PKU 1003 Hangover
- PKU1003 Hangover(水题)
- ACM pku 1003 解题报告(练习输入输出)
- PKU_1003_Hangover
- pku 1003解题报告
- pku 1003 Hangover
- pku acm 1003
- 北大PKU在线测试1003
- POJ 1003求Hangover解题报告——【PKU ACM】
- PKU ACM 1003 Hangover
- PKU JudgeOnline练手札记之1003
- pku 1003
- Hangover pku1003
- 1003 Emergency (25)
- 三维广搜 PKU2225||ZJU1438
- PKU 1463
- PKU1574&&DFS
- pku3517(约瑟夫环)
- pku 3667 hotel
- pku1847 Tram