Rosetta Problems

Gather Coins

https://atcoder.jp/contests/abc369/tasks/abc369_f