Need Help With Atcoder solution

As you can see this solution of mine is giving WA’s on 4 of the test cases.
(Submission #5769284 - AtCoder Beginner Contest 128)
Can anyone tell why?