Weird run-time error in java
Difference between en2 and en3, changed 235 character(s)
Hello Codeforces!↵
↵
Can anybody please explain why this code is giving run-time error on codeforces? This solution is accepted in the actual OJ where the contest took place.↵
↵
Here is the contest link-↵
https://codeforces.me/gym/102141↵
Problem no is **G**.↵
↵
Here is my code-↵
https://ideone.com/xEqXuc
↵
↵
Could it be a reason that the testcases are not given as standard input output rather as a file? Although there seems to be no problem when using C++. So I can't be sure of what's going on here! Someone please shed some light here.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English acmbucc 2020-09-04 09:41:11 235
en2 English acmbucc 2020-09-04 08:31:04 8
en1 English acmbucc 2020-09-03 18:35:11 329 Initial revision (published)