Stupid Machine problem

Hello Everyone,
https://www.codechef.com/viewsolution/38347508
Can anyone tell me why this solution is failing for other sub-task(Partially correct answer) or what is a bottleneck in this code
Thanks for your help in advance

take sum as long not int

1 Like