Nagarro interview question

Maths should b strong.