Remainder problem when dividing numbers The number x is a positive integer < 100. When x is divided by 7, the remainder is 2, and when x is divided by 10 the remainder is 8. What is the value of x?
Is there a formula to solve this type of problem? I could guess numbers but that would take time. If there isn't a formula, could you show me the fast way to guess numbers for this problem
 A: Less a formula than a strategy.
Since the number has a remainder of 8 when divided by 10, it ends with an 8. When the number is divided by 7, is has a remainder of 2; so there is a multiple of 7 which, when we add 2 to it, it gives a number that ends in 8. What multiple of 7 < 100 ends in 6? 56; so our number is 58.
A: The usual way to deal with this is the Chinese Remainder Theorem. But this is what I did.
The second piece of information tells us that $x$ ends with an $8$. Subtracting $2$, what is a multiple of $7$ that ends in $6$? Well $56$ works. So $x = 58$ is one solution.
A: $$x<100$$
$$x \equiv 2 \pmod 7 \Rightarrow x=2+7k, k \in \mathbb{Z} (*)$$
$$x \equiv 8 \pmod {10} \overset{(*)}{\Rightarrow} 2+7k \equiv 8 \pmod {10}\\  \Rightarrow 7k \equiv 6 \pmod {10}$$
We check which of the numbers $1, \dots, 9$ satisfies the above relation.
For $k=1$, the relation is not satisied.
For $k=2$, the relation is not satisied.
For $k=3$, the relation is not satisied.
For $k=4$, the relation is not satisied.
For $k=5$, the relation is not satisied.
For $k=6$, the relation is not satisied.
For $k=7$, the relation is not satisied.
For $k=8$, the relation is satisfied $\checkmark$
For $k=9$,the relation is not satisfied.
So, we have $k=8$.
Therefore, $x=2+7 \cdot 8=58<100$.
A: This is one fairly quick way to solve this problem.
 When x is divided by 7, the remainder is 2  

$x \equiv 2 \pmod 7$
$x = 2 + 7t$ for some $t.$
 when x is divided by 10 the remainder is 8

$x \equiv 8 \pmod{10}$
$2 + 7t \equiv 8 \pmod{10}$
$7t \equiv 6 \pmod{10}$  (Note $3 \cdot 7 = 21 = 1 \mod {10}$)
$21t \equiv 18 \pmod{10}$
$t \equiv 8 \pmod{10}$
$t = 8 + 10u$
$x = 2+7t = 2+7(8+10u) = 58+70u.$
$x \equiv 58 \pmod{70}$
