Rosetta Problems

Battle with E869120!

https://atcoder.jp/contests/s8pc-5/tasks/s8pc_5_d