EXL Service interview question

Maths puzzles, coding