| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
大家看看为什么time limit exceed?郁闷啊,搞不明白:(#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator