My solution to http://www.puzzlenode.com/puzzles/11-hitting-rock-bottom