Https://www.codechef.com/viewsolution/37967682

https://www.codechef.com/viewsolution/37967682
The submission is returned with runtime error.
Please help me with it. It is working absolutely fine with test case. It is showing NZEC in run option but custom run isn’t showing any bug.