結果 : helpful maths codeforces solution in python