結果 : leetcode problem 9 solution python