Rosetta Problems

On the Way

https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_a