Back to General discussions forum
I think statement of problem should mention that at least 1 girl and 1 pig is required, because otherwise the example is wrong and 200 legs with 500 tits have 10 solutions:
Pigs |Tits per pig |Girls
50 |10 |0
30 |14 |40
25 |16 |50
15 |24 |70
10 |34 |80
6 |54 |88
5 |64 |90
3 |104 |94
2 |154 |96
1 |304 |98
just had the same thing... i thought that it would be sth like :' at least 1 girl should be present', even though it is not stated in the problem. Didn't fix it though, just went for the solutions and it was accepted (perhaps no such case was present in my test data)