SnackDown Q2(CHEFPRMS) Wrong Answer in python

can anyone please explain why wrong answer here is my approch==>https://www.codechef.com/viewsolution/20843056