My code for the challenges at codeeval.com