結果

問題 No.432 占い(Easy)
ユーザー ああいいああいい
提出日時 2022-05-17 11:54:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 76,916 KB
最終ジャッジ日時 2023-10-13 08:57:14
合計ジャッジ時間 3,556 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,512 KB
testcase_01 AC 70 ms
71,432 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 71 ms
75,428 KB
testcase_05 AC 68 ms
71,284 KB
testcase_06 AC 71 ms
71,276 KB
testcase_07 AC 71 ms
75,324 KB
testcase_08 WA -
testcase_09 AC 93 ms
76,720 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 75 ms
76,292 KB
testcase_13 AC 76 ms
76,280 KB
testcase_14 WA -
testcase_15 AC 70 ms
71,268 KB
testcase_16 AC 69 ms
71,248 KB
testcase_17 AC 74 ms
76,328 KB
testcase_18 AC 77 ms
76,476 KB
testcase_19 WA -
testcase_20 AC 74 ms
76,464 KB
testcase_21 AC 74 ms
76,336 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 92 ms
76,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

def calc(S):
    l = list(map(int,list(S)))
    while len(l) > 1:
        nx = [0] * (len(l) - 1)
        for i in range(len(l) - 1):
            nx[i] = (l[i] + l[i+1]) % 9
        l = nx
    return l[0]
for _ in range(T):
    print(calc(input()))
0