Genpact interview question

some general math calculations