|
|
вернуться в форумOutput limit exceeded What is wrong in my code? Thanks [code deleted] Edited by moderator 19.11.2019 23:57 Re: Output limit exceeded Well, there's only two numbers in the input. For some reason you're using while, and for some reason it leads to infinite cycle apparently. Try to replace your while with if. Also, you assume there's exactly 10 cans total. This is not true. The task says "no more than 10". Edited by author 30.09.2016 18:25 Re: Output limit exceeded while becomes endless because of mistake: Current state: while(scanf("%d %d",&a,&b)!=EOF && a<11 || b<11){ Should be: while(scanf("%d %d",&a,&b)!=EOF && (a<11 || b<11)){ |
|
|