Rosetta Problems

Apple Harvest

https://atcoder.jp/contests/awc0040/tasks/awc0040_c