take a number between 1 and 100. Divide the number by 3 and take the remainder (e.g. if the number was 11, the remainder is 2). Divide the original number by 5 and take the remainder , and then do the same with 7.
You have 3 remainders at hand. Call them x3, x5 and x7 respectively. Multiply these numbers as follows: x3 by 70, x5 by 21 and x7 by 15. Add them all. If it exceeds 105, divide by 105 and look at the remainder. You get the right number !
An example: Let’s take the number 32.
x3 = (32 % 3) = 2
x5 = (32 % 5) = 2
x7 = (32 % 7) = 4
so now let’s multiply them:
x3 * 70 = 140
x5 * 21 = 42
x7 * 15 = 60
Adding them up we get:
140 + 42 + 60 = 242
Dividing by 105, we pick the remainder 32, our original number!
This trick can work for numbers larger than 100 as well but you have to know in which group of 100 (technically 105) the original number is in. In the case of larger numbers you might have to ADD 105 instead of subtracting in order to get to the right number.