結果

問題 No.432 占い(Easy)
ユーザー ABKZABKZ
提出日時 2023-07-15 16:27:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,832 KB
実行使用メモリ 76,656 KB
最終ジャッジ日時 2023-10-17 02:51:44
合計ジャッジ時間 3,391 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,372 KB
testcase_01 AC 37 ms
53,372 KB
testcase_02 AC 37 ms
53,372 KB
testcase_03 AC 39 ms
53,372 KB
testcase_04 AC 60 ms
66,432 KB
testcase_05 AC 38 ms
53,376 KB
testcase_06 AC 39 ms
53,376 KB
testcase_07 AC 53 ms
66,440 KB
testcase_08 AC 39 ms
53,376 KB
testcase_09 AC 61 ms
65,780 KB
testcase_10 AC 74 ms
74,080 KB
testcase_11 AC 83 ms
75,960 KB
testcase_12 AC 141 ms
76,372 KB
testcase_13 AC 141 ms
76,656 KB
testcase_14 AC 80 ms
75,936 KB
testcase_15 AC 39 ms
53,376 KB
testcase_16 AC 39 ms
53,376 KB
testcase_17 AC 88 ms
75,964 KB
testcase_18 AC 104 ms
76,020 KB
testcase_19 AC 94 ms
75,948 KB
testcase_20 AC 91 ms
75,980 KB
testcase_21 AC 91 ms
76,188 KB
testcase_22 AC 72 ms
72,720 KB
testcase_23 AC 91 ms
76,372 KB
testcase_24 AC 62 ms
65,796 KB
testcase_25 AC 62 ms
65,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    S = [int(x) for x in input()]
    lp_num = len(S) - 1
    for _ in range(lp_num):
        a = [0] * (len(S) -1)
        b = sum([[x,x] for x in S], [])[1:-1]
        for i, num in enumerate(b):
            a[i//2] += b[i]
            
        S = [x if x < 10 else sum(divmod(x, 10)) for x in a]
    print(S[0])
0