a : 15 = x rest 10 ==>a=15x+10 |+5
a : 12 = y rest 7 ==>a =12y+7 |+5
a :22 = z rest 17 ==>a =22z+17 |+5
==>a + 5 = 15×(x+1)
==>a + 5 = 12×(y+1)
==>a + 5 = 22×(z+1)
a + 5 = c.m.m.m.c (15;12;22)
15 = 3 × 5
12 = 2^2 × 3
22 = 2 × 11
-----------------
2^2 × 3 × 5 × 11 = 660
a + 5 = 660
a = 660 - 5
a = 655 (numarul cautat)