n : 5 = x rest 3 ==> n = 5x + 3 |+2
n : 8 = y rest 6 ==> n = 8y + 6 |+2
n : 10 = z rest 8 ==> n = 10z + 8 |+2
==> n + 2 = 5(x+1)
==> n + 2 = 8(y+1)
==> n + 2 = 10(z+1)
c.m.m.m.c (5;8;10) = 8×5 = 40
n + 2 = 40
n = 40-2
n = 38 (numarul cautat)
Verificam:
38 : 5 = 7 rest 3
38 : 8 = 4 rest 6
38 : 10 = 3 rest 8