apple pie's submission of Pass the Exam | CodeChef