Skip to content

Commit 7c5e1c5

Browse files
Merge pull request #2490 from shuaigewudi/master
修改 0039.组合总和.md:修改python代码错误,将continue改为break
2 parents 1f5fe50 + 12bc134 commit 7c5e1c5

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-
continue
314+
break
315315
total += candidates[i]
316316
path.append(candidates[i])
317317
self.backtracking(candidates, target, total, i, path, result)

0 commit comments

Comments
 (0)