Need held to understand my mistake (HDDN)

Hi,

Here is my python3 program : CodeChef: Practical coding for everyone

I tried it on some tests cases I created and it was correct each time, I would be grateful if someone give me some test case where my solution is incorrect, or just explain me where is my mistake.

Thanks

Closed as requested by user.