We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4bddd3 commit 9eca7a7Copy full SHA for 9eca7a7
그리디 문제/곱하기 혹은 더하기.py
@@ -2,7 +2,7 @@
2
rst = 0
3
4
for i in range(len(s)) :
5
- if s[i-1] == 0 or s[i] == 0 or s[i] == 1 :
+ if s[i] == 0 or rst == 0:
6
rst += s[i]
7
else :
8
rst *= s[i]
0 commit comments