Rosetta Problems

AtCoder Jumper

https://atcoder.jp/contests/agc050/tasks/agc050_a