Microsoft Interview Question

Involved knowing a bit of number theory.