結果

問題 No.1665 quotient replace
ユーザー lloyzlloyz
提出日時 2021-11-29 21:33:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 524 ms / 3,000 ms
コード長 438 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 259,092 KB
最終ジャッジ日時 2023-09-15 09:35:19
合計ジャッジ時間 12,034 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
84,252 KB
testcase_01 AC 108 ms
84,204 KB
testcase_02 AC 106 ms
84,092 KB
testcase_03 AC 107 ms
84,416 KB
testcase_04 AC 109 ms
84,488 KB
testcase_05 AC 107 ms
84,136 KB
testcase_06 AC 113 ms
84,400 KB
testcase_07 AC 113 ms
84,624 KB
testcase_08 AC 112 ms
84,604 KB
testcase_09 AC 126 ms
87,520 KB
testcase_10 AC 239 ms
132,452 KB
testcase_11 AC 372 ms
186,200 KB
testcase_12 AC 146 ms
97,284 KB
testcase_13 AC 524 ms
259,092 KB
testcase_14 AC 487 ms
257,844 KB
testcase_15 AC 446 ms
257,760 KB
testcase_16 AC 479 ms
258,900 KB
testcase_17 AC 477 ms
257,892 KB
testcase_18 AC 106 ms
84,140 KB
testcase_19 AC 104 ms
84,000 KB
testcase_20 AC 104 ms
84,208 KB
testcase_21 AC 105 ms
84,160 KB
testcase_22 AC 107 ms
83,992 KB
testcase_23 AC 104 ms
84,340 KB
testcase_24 AC 106 ms
84,232 KB
testcase_25 AC 104 ms
84,268 KB
testcase_26 AC 111 ms
84,572 KB
testcase_27 AC 113 ms
84,364 KB
testcase_28 AC 120 ms
88,032 KB
testcase_29 AC 127 ms
94,024 KB
testcase_30 AC 222 ms
161,848 KB
testcase_31 AC 288 ms
205,748 KB
testcase_32 AC 347 ms
180,408 KB
testcase_33 AC 222 ms
117,720 KB
testcase_34 AC 333 ms
185,964 KB
testcase_35 AC 317 ms
177,288 KB
testcase_36 AC 329 ms
183,616 KB
testcase_37 AC 299 ms
162,308 KB
testcase_38 AC 355 ms
198,684 KB
testcase_39 AC 278 ms
150,528 KB
testcase_40 AC 282 ms
150,920 KB
testcase_41 AC 268 ms
150,528 KB
testcase_42 AC 106 ms
84,252 KB
testcase_43 AC 106 ms
84,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

spl = [0 for _ in range(10**6 + 1)]
spl[1] = 1
for i in range(2, 10**6 + 1):
    if spl[i]:
        continue
    for j in range(i, 10**6 + 1, i):
        spl[j] = i

P = [0 for _ in range(n)]
for i in range(n):
    while A[i] > 1:
        A[i] //= spl[A[i]]
        P[i] += 1

state = 0
for i in range(n):
    state ^= P[i]

if state == 0:
    print("black")
else:
    print("white")
0