No test case being passed

I have edited your code… You just need to use long long int values only… Try to submit it now…

But why?
The complexity is O(n)
Also the constraints are well under the range of int