I am getting partially correct answer though i believe the logic is sound. Could someone please help me with this?
Maybe take a look at this - https://www.codechef.com/viewsolution/33177075
I’m having a hard time reading the Python script.
Thanks a lot! Although i’m still unable to understand why mine isn’t accepted. I believe mine is implemented in the reverse order but it is the same thing.