結果 : grid challenge hackerrank solution in python