I recently go through this problem and try to solve it: https://codeforces.me/gym/102697/problem/008 This is my code: https://onlinegdb.com/mz1QjL3om I tried the formula in the problem but it didn't work with the test cases. I think that some test cases are wrong. Help me!!



