結果

問題 No.1458 Segment Function
ユーザー rlangevinrlangevin
提出日時 2023-09-23 01:17:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 77,188 KB
最終ジャッジ日時 2023-09-23 01:17:15
合計ジャッジ時間 4,448 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,436 KB
testcase_01 AC 72 ms
71,236 KB
testcase_02 AC 70 ms
71,284 KB
testcase_03 AC 70 ms
71,412 KB
testcase_04 AC 70 ms
71,400 KB
testcase_05 AC 74 ms
71,560 KB
testcase_06 AC 76 ms
71,364 KB
testcase_07 AC 71 ms
71,428 KB
testcase_08 AC 98 ms
76,404 KB
testcase_09 AC 76 ms
76,456 KB
testcase_10 AC 75 ms
76,276 KB
testcase_11 AC 77 ms
76,372 KB
testcase_12 AC 77 ms
76,412 KB
testcase_13 AC 72 ms
71,696 KB
testcase_14 AC 72 ms
72,024 KB
testcase_15 AC 72 ms
71,980 KB
testcase_16 AC 73 ms
72,004 KB
testcase_17 AC 71 ms
72,048 KB
testcase_18 AC 85 ms
77,024 KB
testcase_19 AC 83 ms
77,144 KB
testcase_20 AC 79 ms
77,004 KB
testcase_21 AC 79 ms
77,048 KB
testcase_22 AC 78 ms
77,128 KB
testcase_23 AC 70 ms
71,408 KB
testcase_24 AC 70 ms
72,044 KB
testcase_25 AC 69 ms
71,640 KB
testcase_26 AC 79 ms
77,032 KB
testcase_27 AC 78 ms
77,188 KB
testcase_28 AC 72 ms
71,372 KB
testcase_29 AC 70 ms
72,176 KB
testcase_30 AC 69 ms
72,108 KB
testcase_31 AC 72 ms
71,896 KB
testcase_32 AC 83 ms
76,444 KB
testcase_33 AC 76 ms
76,260 KB
testcase_34 AC 77 ms
76,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

L = [6, 2, 5, 5, 4, 5, 6, 4, 7, 6]
def f(X):
    v = 0
    for x in X:
        if x == "-":
            v += 1
        else:
            v += L[int(x)]
    return str(v)

P, N = input().split()
if len(N) >= 3:
    N = 100
else:
    N = int(N)

for _ in range(N):
    P = f(P)
    
print(P)
0