結果

問題 No.1665 quotient replace
ユーザー H3PO4H3PO4
提出日時 2021-09-03 21:47:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 863 ms / 3,000 ms
コード長 339 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 153,424 KB
最終ジャッジ日時 2023-08-21 21:00:56
合計ジャッジ時間 32,706 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 520 ms
37,276 KB
testcase_01 AC 527 ms
37,224 KB
testcase_02 AC 532 ms
37,308 KB
testcase_03 AC 523 ms
37,308 KB
testcase_04 AC 521 ms
37,348 KB
testcase_05 AC 534 ms
37,436 KB
testcase_06 AC 522 ms
38,308 KB
testcase_07 AC 520 ms
37,336 KB
testcase_08 AC 528 ms
37,968 KB
testcase_09 AC 530 ms
40,344 KB
testcase_10 AC 637 ms
68,456 KB
testcase_11 AC 783 ms
119,148 KB
testcase_12 AC 556 ms
41,612 KB
testcase_13 AC 857 ms
153,424 KB
testcase_14 AC 844 ms
153,160 KB
testcase_15 AC 863 ms
153,328 KB
testcase_16 AC 857 ms
153,192 KB
testcase_17 AC 854 ms
153,168 KB
testcase_18 AC 521 ms
37,292 KB
testcase_19 AC 529 ms
37,324 KB
testcase_20 AC 521 ms
37,256 KB
testcase_21 AC 527 ms
37,240 KB
testcase_22 AC 532 ms
37,168 KB
testcase_23 AC 538 ms
37,300 KB
testcase_24 AC 519 ms
37,260 KB
testcase_25 AC 519 ms
37,192 KB
testcase_26 AC 536 ms
37,436 KB
testcase_27 AC 529 ms
38,208 KB
testcase_28 AC 532 ms
40,576 KB
testcase_29 AC 576 ms
40,728 KB
testcase_30 AC 737 ms
86,872 KB
testcase_31 AC 773 ms
121,080 KB
testcase_32 AC 755 ms
113,568 KB
testcase_33 AC 638 ms
60,988 KB
testcase_34 AC 704 ms
97,216 KB
testcase_35 AC 680 ms
91,252 KB
testcase_36 AC 687 ms
90,708 KB
testcase_37 AC 689 ms
91,672 KB
testcase_38 AC 736 ms
104,148 KB
testcase_39 AC 666 ms
76,044 KB
testcase_40 AC 662 ms
76,220 KB
testcase_41 AC 680 ms
76,280 KB
testcase_42 AC 536 ms
37,288 KB
testcase_43 AC 546 ms
37,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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