### Re: WA in 107

Posted:

**Sun Mar 06, 2011 12:22 am**This, is why uva problems can be frustrating. To me:

5 1 with a solution of 2 8 would not be valid because 5 is prime so nothing divides into it (ex: N=1, 5/(n+1)=5/2, 2.5/2 =1.25). In this case N would have to be 4, but this would result in 4 worker cats....

That they expect you to round is not obvious.

Eric

Clearly implies that any values of N which results in non-integer heights are not allowed. For instance:The number of cats inside each (non-smallest) cat's hat is a constant, N. The height of these cats-in-a-hat is 1/(n+1) times the height of the cat whose hat they are in.

The smallest cats are of height one;

these are the cats that get the work done.

All heights are positive integers.

5 1 with a solution of 2 8 would not be valid because 5 is prime so nothing divides into it (ex: N=1, 5/(n+1)=5/2, 2.5/2 =1.25). In this case N would have to be 4, but this would result in 4 worker cats....

That they expect you to round is not obvious.

Eric