eClerx Interview Question

a mathematical puzzle