結果
| 問題 | No.1665 quotient replace |
| コンテスト | |
| ユーザー |
shiroha_F14
|
| 提出日時 | 2021-08-11 20:40:53 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
TLE
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 481 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 126,236 KB |
| 最終ジャッジ日時 | 2026-10-15 23:13:00 |
| 合計ジャッジ時間 | 56,958 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 TLE * 1 |
ソースコード
# Python (not PyPy) speed test
spf = [0 for i in range(1000001)]
pr = []
for i in range(2, 1000001):
if spf[i] == 0:
spf[i] = i
pr.append(i)
j = 0
while j < len(pr) and pr[j] <= spf[i] and i * pr[j] <= 1000000:
spf[i * pr[j]] = pr[j]
j += 1
n = int(input())
a = list(map(int, input().split()))
fold = 0
for v in a:
cnt = 0
while v > 1:
v //= spf[v]
cnt += 1
fold ^= cnt
print("white" if fold else "black")
shiroha_F14