Skip to content

Commit 4797b6b

Browse files
authored
Update 2.cpp
1 parent 9657df0 commit 4797b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

11/2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int main(void) {
1313
for (int i = 1; i < str.size(); i++) {
1414
// 두 수 중에서 하나라도 '0' 혹은 '1'인 경우, 곱하기보다는 더하기 수행
1515
int num = str[i] - '0';
16-
if (num <= 1 or result <= 1) {
16+
if (num <= 1 || result <= 1) {
1717
result += num;
1818
}
1919
else {
@@ -22,4 +22,4 @@ int main(void) {
2222
}
2323

2424
cout << result << '\n';
25-
}
25+
}

0 commit comments

Comments
 (0)