Rosetta Problems

最後の戦い (The Last Battle)

https://atcoder.jp/contests/joisp2023/tasks/joisp2023_j