Rosetta Problems

Colorful Balls

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1351