Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 897a31c

Browse files
Merge pull request youngyangyang04#2182 from TonyHanzhiSU/patch-1
Update 0039.组合总和.md, 修复Python代码的一个bug
2 parents d67ee8f + 5794b17 commit 897a31c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0039.组合总和.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class Solution:
311311

312312
for i in range(startIndex, len(candidates)):
313313
if total + candidates[i] > target:
314-
break
314+
continue
315315
total += candidates[i]
316316
path.append(candidates[i])
317317
self.backtracking(candidates, target, total, i, path, result)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /