結果

問題 No.432 占い(Easy)
ユーザー maspy
提出日時 2020-01-19 02:39:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,712 KB
最終ジャッジ日時 2024-06-28 17:35:42
合計ジャッジ時間 13,783 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 13 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

T = int(readline())
S = readlines()

answer = []
for s in S:
    A = np.array(list(s.decode().rstrip()),np.int32)
    while len(A) > 1:
        A = (A[:-1] + A[1:]) % 9
    x = A[0]
    if not x:
        x = 9
    answer.append(x)

print('\n'.join(map(str,answer)))
0