https://www.codechef.com/viewsolution/49261672
Can someone please tell me what is wrong with this code? I’m new to codechef, and I tried running this with various inputs and logic seems fine to me, i don’t understand what’s wrong, im getting only 40% success