Because you were not providing any input.

2 3 4
3 4

I forked your code with this as stdin, and there was no runtime error.

1 Like

If this is attempt to ask as short question as possible, you can replace “RUNTIME error” with RE.

I recommend you to ask as clear questions as possible instead of as short as possible :wink:

1 Like

He is already fed up with the error in his code, and now he has got an error in his question! :smiley: