結果
| 問題 |
No.1665 quotient replace
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-03 21:47:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,262 ms / 3,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 565 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 137,100 KB |
| 最終ジャッジ日時 | 2024-12-15 12:01:13 |
| 合計ジャッジ時間 | 48,549 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 |
ソースコード
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
MAX = 10 ** 6
table = np.zeros(MAX + 1, dtype=int)
for i in range(2, MAX + 1):
if not table[i]:
j = i
while j <= MAX:
table[j::j] += 1
j *= i
x = np.bitwise_xor.reduce(table[A])
print('white' if x else 'black')