June Lunchtime Summary Power doubt

I tested my solution on every other case i made it worked well
but it gave me WA in the contest what are the edge cases i am missing??
Thanks.

Here’s my


[1] 


  [1]: https://www.codechef.com/viewsolution/19049357