Exam Problem Solver 100/100 - Ugly, but working