From 0629a672af22b2c9605ceb371d61210df0a187b4 Mon Sep 17 00:00:00 2001 From: sangge-rockpi <2251250136@qq.com> Date: Fri, 19 Jan 2024 20:33:27 +0800 Subject: [PATCH] update 1 --- leetcode/1.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/leetcode/1.py b/leetcode/1.py index 8a3bda2..f05e669 100644 --- a/leetcode/1.py +++ b/leetcode/1.py @@ -14,9 +14,10 @@ class Solution: temp_list = nums temp_list.pop(i) if another not in temp_list: - continue + answer.append(i) + answer.append(temp_list.index(another) + 1) answer.append(i) - answer.append(nums.index(target - nums[i])) + answer.append(nums.index(another)) return answer return answer