Rosetta Problems

Beware of Overflow

https://atcoder.jp/contests/arc179/tasks/arc179_c