Rosetta Problems

AtArcher

https://atcoder.jp/contests/arc131/tasks/arc131_d