Codeforces Problem 1343C WA verdict

Please tell me why I am getting WA verdict…??
I have checked the test cases, they are working Fine.

What about ?
1
1
1
Answer should be 1.A quick fix can be change your second IF to ELSE/ELSE IF. I didn’t look for other problem. Changing it may lead to others necessary changes. But It’s sure that your solution is not correct