Can anyone tell me as to why am I getting Runtime Error in the following code. The same test Case give me the correct answer in other compilers. Even the Codeforces compiler gives the correct answer but the same test case is given Runtime error after submission.
Link to Problem:
Link to submission:
Any help would be appreciated.

I got my mistake. Thank you.