apple pie's submission of Hill Sequence | CodeChef