結果

問題 No.432 占い(Easy)
ユーザー ああいいああいい
提出日時 2022-05-17 11:57:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 76,940 KB
最終ジャッジ日時 2023-10-13 09:00:53
合計ジャッジ時間 4,242 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,496 KB
testcase_01 WA -
testcase_02 AC 70 ms
71,300 KB
testcase_03 AC 70 ms
71,408 KB
testcase_04 AC 77 ms
75,256 KB
testcase_05 AC 72 ms
71,412 KB
testcase_06 WA -
testcase_07 AC 73 ms
75,204 KB
testcase_08 AC 72 ms
71,300 KB
testcase_09 WA -
testcase_10 AC 79 ms
76,400 KB
testcase_11 AC 75 ms
76,268 KB
testcase_12 AC 80 ms
76,568 KB
testcase_13 AC 78 ms
76,144 KB
testcase_14 AC 75 ms
76,404 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 78 ms
76,456 KB
testcase_19 AC 79 ms
76,432 KB
testcase_20 AC 74 ms
76,196 KB
testcase_21 AC 77 ms
76,260 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

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
    if l[0] == 0:
        l[0] = 9
    return l[0]
for _ in range(T):
    print(calc(input()))
0