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

大家看看为什么time limit exceed?郁闷啊,搞不明白:(

Posted by OQO at 2005-12-30 02:43:40 on Problem 1003
#include<iostream.h>
void main()
{ int i=1;
  float sumout=0,sumin;
  cout<<"please input the lengh"<<endl;
  cin>>sumin;
  while(sumin!=0)
 {
  for(sumout=0,i=1;sumout<sumin;)
  {sumout+=float(1/(++i));
   }
  cout<<"the number of card is "<<i-1<<endl;
  cin>>sumin;
 }
}

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