Hello everyone, I am trying to solve this problem: https://mirror.codeforces.com/contest/1861/problem/B
My submission: https://mirror.codeforces.com/contest/1861/submission/221639641
My Python code is running correctly in my ide, but i am getting runtime error in the sample testcase in codeforces!!
Am i missing anything??