Please Help I am getting WA in sub-task2 #1

I tried to modify code for overflow problem but i am getting WA
https://www.codechef.com/viewsolution/21628610