結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-19 02:40:42 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 524 ms / 2,000 ms |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 381 ms |
| コンパイル使用メモリ | 20,808 KB |
| 実行使用メモリ | 34,856 KB |
| 最終ジャッジ日時 | 2026-03-17 17:24:37 |
| 合計ジャッジ時間 | 15,118 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
ソースコード
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)
if np.all(A == 0):
answer.append(0)
continue
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)))
maspy