Skip to content

Commit 9eca7a7

Browse files
committed
'곱하기혹은더하기'
1 parent a4bddd3 commit 9eca7a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

그리디 문제/곱하기 혹은 더하기.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
rst = 0
33

44
for i in range(len(s)) :
5-
if s[i-1] == 0 or s[i] == 0 or s[i] == 1 :
5+
if s[i] == 0 or rst == 0:
66
rst += s[i]
77
else :
88
rst *= s[i]

0 commit comments

Comments
 (0)