Rosetta Problems

コイン集め 2 (Coin Collecting 2)

https://atcoder.jp/contests/joig2023-open/tasks/joig2023_d