class Solution:
def twoSum(self,nums,target):
dict={}
for i in range(len(nums)):
if target = nums[i] not in dict:
dict[nums[i]]=i
else:
return [dict[target-nums[i]],i]
两数相加python
最新推荐文章于 2023-08-02 16:00:30 发布