結果 : leetcode problem 2 solution python