Ah. This is a classic.
I hope you are familiar with mods. If not, here's a general idea
x = a mod b
x/b yields a remainder of a.
x = 9 mod 10 = -1 mod 10
x = 8 mod 9 = - 1 mod 9
x = 7 mod 8 = - 1 mod 8
...
x = 1 mod 2 = - 1 mod 2
Now, if we find the LCM of (2,3,4...9,10) - 1, thats our...