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

a2017raptor's blog

By a2017raptor, history, 6 months ago, In English

I was submitting my solution for this problem when the checker gave me a runtime error even though it showed that I printed out the correct solution. Could anyone help me understand why this is occuring? My submission.

  • Vote: I like it
  • -2
  • Vote: I do not like it

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

It tells you Exit code is 1, and you have a return 1 in your main for some reason.

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks, that seems to have been the issue, I just didn't know that return statements affected the grader like that.