#1 Solution 1
本文为原创文章,转载或引用时必须保留本文链接和此版权声明信息:
Runtime: | 5972ms | Faster than: | 6.80% users |
Memory Usage: | 13.7MB | Less than: | 83.26% users |
Language: | Python | Submission link: | Result |
Notes
1.
1 2 3 4 5 6 7 |
class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: l = len(nums) for i in range(l): for j in range(i+1, l): if nums[i]+nums[j] == target: return [i, j] |