Epic interview question

Basic math questions (SAT-level), 4 programming problems.