Answer :

As there were five droves with an equal number of animals in each drove, the number must be divisible by 5; and as every one of the eight dealers bought the same number of animals, the number must be divisible by 8.
Therefore the number must be a multiple of 40.
The highest possible multiple of 40 that will work will be found to be 120, and this number could be made up in one of two ways—1 ox, 23 pigs, and 96 sheep, or 3 oxen, 8 pigs, and 109 sheep.
But the first is excluded by the statement that the animals consisted of "oxen, pigs, and sheep," because a single ox is not oxen. Therefore the second grouping is the correct answer.

Math Genius