Please subscribe to the official Codeforces channel in Telegram via the link ×

Runtime error with only 1 change in code?

Revision en1, by bobbilyking, 2018-10-20 15:10:33


my python solution said it had a runtime error on #5, and compared to my previous solution which gave wrong answer at #6, i really don't see a way how it could give a runtime error.


the piece of code that gives "runtime error" for #5:

if remain != 0 and bagsRn != 0: bags+=1

like what? don't understand how that could possibly give a runtime error, it's logically sound and if it gave wrong answer or exceeded time limit it would just say that... not to mention it went through 5 test cases + numerous of my own test cases to try and break it, so at the WORST it should give "wrong answer" not a runtime error


  Rev. Lang. By When Δ Comment
en1 English bobbilyking 2018-10-20 15:10:33 762 Initial revision (published)