LeetCode_1

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]: # ->在python中表示
        for count_1 in range(0,len(nums)):
            for count_2 in range(1,len(nums)):
                if nums[count_1]+nums[count_2] == target:
                    return [count_1,count_2]
posted @ 2020-03-01 14:54  Ys17  阅读(86)  评论(0)    收藏  举报