I won't quote here the full question, because it's irrelevant.
${x \in \mathbb{N}}$
${x \le 250}$
${x \mod 8 = 1}$
${x \mod 7 = 2}$
${x \mod 5 = 3}$
So my idea was to write down ever number that gives modulo 8 = 1, starting at 9, 17, 25, ...
Then I'd have to check which of these numbers is modulo 7 = 2 ...
And then which of them are modulo 5 = 3 ...
But there has to be a more efficient way (I hope).
How do I connect those modulis so I can calculate $x$ straight?