結果

問題 No.432 占い(Easy)
ユーザー maspymaspy
提出日時 2020-01-19 02:39:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 29,796 KB
最終ジャッジ日時 2023-09-11 03:04:30
合計ジャッジ時間 7,043 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
29,624 KB
testcase_01 WA -
testcase_02 AC 139 ms
29,620 KB
testcase_03 AC 140 ms
29,532 KB
testcase_04 AC 139 ms
29,376 KB
testcase_05 AC 137 ms
29,472 KB
testcase_06 WA -
testcase_07 AC 139 ms
29,432 KB
testcase_08 AC 139 ms
29,576 KB
testcase_09 WA -
testcase_10 AC 141 ms
29,516 KB
testcase_11 AC 140 ms
29,564 KB
testcase_12 AC 142 ms
29,796 KB
testcase_13 AC 144 ms
29,584 KB
testcase_14 AC 140 ms
29,428 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 140 ms
29,656 KB
testcase_19 AC 139 ms
29,552 KB
testcase_20 AC 139 ms
29,652 KB
testcase_21 AC 142 ms
29,696 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

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