diff --git a/code_study/Baekjoon/python/1284.py b/code_study/Baekjoon/python/1284.py new file mode 100644 index 0000000..af0c433 --- /dev/null +++ b/code_study/Baekjoon/python/1284.py @@ -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)))) \ No newline at end of file