Rosetta Problems

Not Too Many Balls

https://atcoder.jp/contests/abc332/tasks/abc332_g