結果

問題 No.1458 Segment Function
ユーザー H3PO4H3PO4
提出日時 2022-07-17 09:42:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 293 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2024-04-20 17:43:50
合計ジャッジ時間 2,339 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 27 ms
10,752 KB
testcase_04 AC 28 ms
10,880 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 64 ms
11,136 KB
testcase_09 AC 65 ms
11,136 KB
testcase_10 AC 64 ms
11,008 KB
testcase_11 AC 66 ms
11,136 KB
testcase_12 AC 65 ms
11,008 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 27 ms
10,624 KB
testcase_24 AC 28 ms
11,136 KB
testcase_25 AC 27 ms
10,752 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 28 ms
10,624 KB
testcase_29 AC 28 ms
11,008 KB
testcase_30 AC 28 ms
11,136 KB
testcase_31 RE -
testcase_32 AC 63 ms
11,008 KB
testcase_33 AC 61 ms
11,136 KB
testcase_34 AC 62 ms
11,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P, N = input().split()
N = int(N)
dig = (6, 2, 5, 5, 4, 5, 6, 4, 7, 6)
dig_str = {str(i): d for i, d in enumerate(dig)}
dig_str["-"] = 1
for _ in range(N):
    new_P = 0
    for p in P:
        new_P += dig_str[p]
    new_P = str(new_P)
    if new_P == P:
        break
    P = new_P
print(P)
0