WA in ZCO14003

Question Link : ZCO14003
My Solution : https://www.codechef.com/viewsolution/36114144

It is passing a few testcases but failing in many of them. Can someone please spot the error and tell me?

Use long long.

1 Like

Wow Thanks a lot ! It worked !