Rosetta Problems

しゃくとり!

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1816