Anybody can tell me that why am i getting WA in EQUINOX problem

https://www.codechef.com/viewsolution/45712769

Use long long

thanks @cubefreak777