Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:一次AC,小庆下,嘿嘿(贴程序)

Posted by 05281991 at 2012-05-23 23:44:41 on Problem 1003
In Reply To:一次AC,小庆下,嘿嘿(贴程序) Posted by:a553865290 at 2012-03-07 12:16:16
> #include<iostream>
> using namespace std;
> int main()
> {
>     float c;
>     int i;
>     float a[1000];
>     a[1]=0; 
>     a[2]=0; i=2;
>     while(a[i-1]<=5.20){
>                       a[i]=a[i-1]+1.0/i;
>                       i++;
>     }
>     while(cin>>c && c!=0.00)
>     {
>         i=1;
>         while(c>a[i]){i++;}
>         cout<<i-1<<" card(s)"<<endl;
>     }           
>     return 0;
> } 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator