I tried it but not able to solve it...help

this is the question below

https://www.codechef.com/START4C/problems/QUIZPLAG

this is my code below

please help me sir.