nicknation wrote:A train has fewer than 200 passengers on board.If they get off in pairs, one passanger will be without a partner.If they get off in groups of 3 or 4, there will still be one passenger by himself.However, if they get off in groups of 5, no one will be left alone.How many passengers are there on the train?
You are given that groups of five split up evenly, with none left over. So, whatever the total number is, it's a multiple of 5.
You are given that groups of 2, 3, or 4 will have one left over. So the total number is
not even (so not a multiple of 2*5 = 10) and is
not a multiple of 3 (so not 15, 30, 45,..., etc).
The total is 1 more than a multiple of 3 (because there's one guy left over if they split up into groups of three). Since the number of passengers is odd (that is, not a multiple of 2), then the total must be 6 + 1 = 7, 12 + 1 = 13, etc.
The total is 1 more than a multiple of 4 (because there's one guy left over if they split up into groups of four). Since the number of passengers is odd (that is, not a multiple of 2), then the total must be 4 + 1 = 5, 8 + 1 = 9, 12 + 1 = 13, etc. Some of these possible totals can be eliminated due to the fact that the total isn't a multiple of 3.
So make your lists, and find the first value that is in all three lists. This will be the total they're looking for.