Back to General discussions forum
There are two constraints in problem that is not mentioned in problem statement:
I read many of other solutions and it seems that most people are not aware of second constraint.
Hoperfully this help someone to save hours debugging!
"..The girls are pasturing pigs at the field..." it seems like it's being said that there are girls on the field, so there are more than 0 of them))
Good point! Definitely there should be someone pasturing the pigs, or some of them may get lost, and my solutiong become wrong :).
Though I'm not quite sure about what was meant when writing the statement, I suspect that all the three unknown values should be non-negative integers.
When I proposed the problem to school kids I got various additional questions:
and even more wild ideas about possibly one-legged girls included into number of shepherdesses
not pondering on social and biological aspects of all those questions, I generally point out that any of them leads to problem becoming unsolvable (or allowing too large number of solutions) which, out of common sense, seems to be not our goal :)