PTC interview question

basic maths database