baekjoon 20260205
This commit is contained in:
parent
ef9bd9aa5e
commit
67d9630ecb
15
code_study/Baekjoon/python/1284.py
Normal file
15
code_study/Baekjoon/python/1284.py
Normal file
@ -0,0 +1,15 @@
|
||||
ans = []
|
||||
while (N := input()) != '0' :
|
||||
res = len(N)+1
|
||||
|
||||
for c in N :
|
||||
if c == '1' :
|
||||
res += 2
|
||||
elif c == '0' :
|
||||
res += 4
|
||||
else :
|
||||
res += 3
|
||||
|
||||
ans.append(res)
|
||||
|
||||
print('\n'.join(list(map(str, ans))))
|
||||
Loading…
x
Reference in New Issue
Block a user