Jatin Pandey's submission of Math Hatter | CodeChef