Rosetta Problems

Takahashi's Basics in Education and Learning

https://atcoder.jp/contests/abc129/tasks/abc129_f