Please read the new rule regarding the restriction on the use of AI tools. ×

ApaarGulati's blog

By ApaarGulati, history, 3 months ago, In English

hi. i have written the following code for 1742C — Stripes 1742C - Stripes 269473494 it is running fine on Replit and other IDE's but CF shows Runtime Error(Exit Code is 1) i have tried debugging multiple times but there is no error. what should i do??

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

there is an empty line between test cases but you haven't handled it properly when reading the input

image

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    ohhh i totally did not notice that thanks a lot!!

    edit: hi. i made the appropriate changes to handle the empty line but apparently in the second test, there is a test case(test case 10 which seems to be causing problems) but according to me code is working fine. is it possible that the input in the test case might not be a valid input??