Epic interview question

Quick Math, Logical Reasoning and Coding