From 67d9630ecb4f56f2f46d7938ec4ba1248f205dcc Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Thu, 5 Feb 2026 21:02:30 +0900 Subject: [PATCH] baekjoon 20260205 --- code_study/Baekjoon/python/1284.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 code_study/Baekjoon/python/1284.py 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