Question Link: https://codeforces.me/contest/1539/problem/B
Submission Link: https://codeforces.me/contest/1539/submission/120683760
Can someone help me with this submission, I am getting exit code 2, this is working fine on my console, but submission is failing.