結果

問題 No.1665 quotient replace
ユーザー nok0nok0
提出日時 2021-08-11 20:14:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 597 ms / 3,000 ms
コード長 449 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 264,664 KB
最終ジャッジ日時 2024-05-09 00:38:41
合計ジャッジ時間 12,192 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
76,032 KB
testcase_01 AC 89 ms
75,776 KB
testcase_02 AC 89 ms
75,904 KB
testcase_03 AC 94 ms
77,184 KB
testcase_04 AC 97 ms
77,824 KB
testcase_05 AC 93 ms
76,160 KB
testcase_06 AC 99 ms
79,744 KB
testcase_07 AC 96 ms
78,084 KB
testcase_08 AC 99 ms
78,592 KB
testcase_09 AC 109 ms
84,736 KB
testcase_10 AC 243 ms
136,308 KB
testcase_11 AC 437 ms
187,236 KB
testcase_12 AC 132 ms
96,384 KB
testcase_13 AC 590 ms
264,340 KB
testcase_14 AC 597 ms
264,152 KB
testcase_15 AC 580 ms
264,664 KB
testcase_16 AC 582 ms
264,664 KB
testcase_17 AC 559 ms
264,404 KB
testcase_18 AC 91 ms
75,648 KB
testcase_19 AC 92 ms
75,648 KB
testcase_20 AC 116 ms
76,032 KB
testcase_21 AC 92 ms
75,648 KB
testcase_22 AC 90 ms
76,160 KB
testcase_23 AC 91 ms
75,776 KB
testcase_24 AC 93 ms
76,032 KB
testcase_25 AC 91 ms
75,904 KB
testcase_26 AC 96 ms
78,080 KB
testcase_27 AC 97 ms
78,976 KB
testcase_28 AC 103 ms
84,736 KB
testcase_29 AC 114 ms
92,672 KB
testcase_30 AC 211 ms
167,396 KB
testcase_31 AC 272 ms
199,900 KB
testcase_32 AC 405 ms
187,280 KB
testcase_33 AC 215 ms
123,312 KB
testcase_34 AC 366 ms
160,948 KB
testcase_35 AC 318 ms
168,292 KB
testcase_36 AC 329 ms
177,892 KB
testcase_37 AC 313 ms
167,892 KB
testcase_38 AC 369 ms
167,320 KB
testcase_39 AC 286 ms
151,824 KB
testcase_40 AC 288 ms
151,988 KB
testcase_41 AC 285 ms
151,944 KB
testcase_42 AC 93 ms
76,032 KB
testcase_43 AC 92 ms
76,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0