Hi, I stuck at this problem and I don't see what can be wrong, this is my code:
Code deleted after AC.
Solved, just changed int to long long
No need for long long here. Your first code (using int) got AC, too. Sorry for replying so late.
You are right... I was sure one of my WA is this solution with integers.