hello , i am trying to solve codeforces 9 beta round div2 c question.iam getting correct answers when i compile on my system but when i submit i am getting wrong answer on 4th test case .first i got "wrong output format Unexpected end of file — int64 expected" error then i printed the answer after breaking the for loop without exiting the program directly.then the above error is gone but iam still getting wrong answers on the codeforces platform.can anyone please tell what is the reason for different outputs :) .the submission links are http://mirror.codeforces.com/contest/9/submission/12982000 and http://mirror.codeforces.com/contest/9/submission/12982232