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 |
Re:结果正确,问什么提示'Output Limit Exceeded'?In Reply To:结果正确,问什么提示'Output Limit Exceeded'? Posted by:lzwyelang at 2007-09-24 14:45:26 You should stop your program if there is no data any more. > #include<iostream.h> > void main() > { > int n; > cin>>n; > while(1) > { > while(n%2==0&&n!=0) > n/=2; > if(n==1) > cout<<"YES"<<endl; > else cout<<"NO"<<endl; > cin>>n; > > } > } > 'Output Limit Exceeded' > 谁能告诉我为什么呢? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator