Rosetta Problems

釘 (Nails)

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