結果

問題 No.1665 quotient replace
ユーザー minimumminimum
提出日時 2021-09-04 13:35:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 626 ms / 3,000 ms
コード長 414 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 259,024 KB
最終ジャッジ日時 2023-08-22 21:02:42
合計ジャッジ時間 13,748 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
84,072 KB
testcase_01 AC 109 ms
83,908 KB
testcase_02 AC 110 ms
83,944 KB
testcase_03 AC 113 ms
84,136 KB
testcase_04 AC 115 ms
84,020 KB
testcase_05 AC 115 ms
83,984 KB
testcase_06 AC 119 ms
84,496 KB
testcase_07 AC 115 ms
84,344 KB
testcase_08 AC 120 ms
84,436 KB
testcase_09 AC 128 ms
87,000 KB
testcase_10 AC 250 ms
132,072 KB
testcase_11 AC 396 ms
184,668 KB
testcase_12 AC 144 ms
97,036 KB
testcase_13 AC 517 ms
257,608 KB
testcase_14 AC 626 ms
257,656 KB
testcase_15 AC 576 ms
258,156 KB
testcase_16 AC 504 ms
258,580 KB
testcase_17 AC 504 ms
259,024 KB
testcase_18 AC 109 ms
84,056 KB
testcase_19 AC 111 ms
83,820 KB
testcase_20 AC 107 ms
83,644 KB
testcase_21 AC 106 ms
83,920 KB
testcase_22 AC 111 ms
83,888 KB
testcase_23 AC 113 ms
83,836 KB
testcase_24 AC 112 ms
84,132 KB
testcase_25 AC 107 ms
83,816 KB
testcase_26 AC 115 ms
84,204 KB
testcase_27 AC 111 ms
84,144 KB
testcase_28 AC 122 ms
87,900 KB
testcase_29 AC 129 ms
93,988 KB
testcase_30 AC 225 ms
161,692 KB
testcase_31 AC 291 ms
205,600 KB
testcase_32 AC 376 ms
180,144 KB
testcase_33 AC 229 ms
117,320 KB
testcase_34 AC 343 ms
185,772 KB
testcase_35 AC 320 ms
176,036 KB
testcase_36 AC 335 ms
183,480 KB
testcase_37 AC 295 ms
161,484 KB
testcase_38 AC 359 ms
198,268 KB
testcase_39 AC 278 ms
150,584 KB
testcase_40 AC 279 ms
150,416 KB
testcase_41 AC 279 ms
150,356 KB
testcase_42 AC 112 ms
83,940 KB
testcase_43 AC 111 ms
84,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

# 素数列挙
mx = 10 ** 6
div = [0] * (mx + 1)
div[1] = 1
for i in range(2, mx + 1):
    if div[i]:
        continue
    for j in range(i, mx + 1, i):
        div[j] = i

#素因数分解
cnt = [0] * N
for i in range(N):
    while A[i] > 1:
        A[i] //= div[A[i]]
        cnt[i] += 1

# XOR
x = 0
for c in cnt:
    x ^= c
print(["black", "white"][x > 0])
0