結果

問題 No.509 塗りつぶしツール
ユーザー Akijin_007Akijin_007
提出日時 2022-10-21 14:30:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 71,384 KB
最終ジャッジ日時 2023-09-13 15:45:15
合計ジャッジ時間 4,213 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,136 KB
testcase_01 AC 71 ms
71,048 KB
testcase_02 AC 70 ms
71,140 KB
testcase_03 AC 68 ms
71,160 KB
testcase_04 AC 70 ms
71,044 KB
testcase_05 AC 70 ms
71,136 KB
testcase_06 AC 68 ms
71,200 KB
testcase_07 AC 69 ms
71,332 KB
testcase_08 AC 70 ms
71,292 KB
testcase_09 AC 69 ms
71,260 KB
testcase_10 AC 69 ms
71,136 KB
testcase_11 AC 69 ms
71,108 KB
testcase_12 AC 70 ms
71,144 KB
testcase_13 AC 71 ms
71,172 KB
testcase_14 AC 70 ms
71,044 KB
testcase_15 AC 69 ms
70,992 KB
testcase_16 AC 71 ms
71,208 KB
testcase_17 AC 70 ms
71,044 KB
testcase_18 AC 70 ms
71,204 KB
testcase_19 AC 70 ms
71,384 KB
testcase_20 AC 71 ms
71,340 KB
testcase_21 AC 69 ms
71,044 KB
testcase_22 AC 70 ms
70,988 KB
testcase_23 AC 69 ms
70,988 KB
testcase_24 AC 68 ms
70,960 KB
testcase_25 AC 70 ms
71,252 KB
testcase_26 AC 69 ms
71,296 KB
testcase_27 AC 70 ms
71,268 KB
testcase_28 AC 69 ms
71,272 KB
testcase_29 AC 68 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

n = input()

ans = 2 * len(n) + 1

c = [1, 0, 0, 0, 1, 0, 1, 0, 2, 1]

for i in range(len(n)):
    ans += c[int(n[i])]

ans1 = 2 + len(n)

for i in range(len(n)):
    ans1 += c[int(n[i])] * 2

print(min(ans, ans1))
0