int ballsDistribution(int colors, int ballsPerColor, int boxSize) {
int nbcolmb = 0;
int nbballs = 0;
while (colors > 0) {
if (nbballs / boxSize != (nbballs + ballsPerColor - 1) / boxSize) nbcolmb++;
nbballs += ballsPerColor;
colors--;
}
return nbcolmb;
}