Skip to content

Instantly share code, notes, and snippets.

View olive-su's full-sized avatar
📚
Studying

Sugyeong Kim olive-su

📚
Studying
View GitHub Profile
@olive-su
olive-su / 0116_곱하기_혹은_더하기.py
Last active January 18, 2022 10:42
1day_1Algorithm_154
from sys import stdin
S = list(map(int, stdin.readline().rstrip()))
rst = S[0]
for i in range(1, len(S)):
if S[i] == 0 or S[i-1] == 0:
rst += S[i]
else:
rst *= S[i]