結果

問題 No.1665 quotient replace
ユーザー gr1msl3ygr1msl3y
提出日時 2021-09-03 22:01:26
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 462 ms / 3,000 ms
コード長 387 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 259,144 KB
最終ジャッジ日時 2023-08-21 21:48:32
合計ジャッジ時間 11,295 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,996 KB
testcase_01 AC 73 ms
71,020 KB
testcase_02 AC 74 ms
71,208 KB
testcase_03 AC 115 ms
84,116 KB
testcase_04 AC 110 ms
84,280 KB
testcase_05 AC 106 ms
84,108 KB
testcase_06 AC 133 ms
84,308 KB
testcase_07 AC 110 ms
84,444 KB
testcase_08 AC 114 ms
84,560 KB
testcase_09 AC 122 ms
87,176 KB
testcase_10 AC 240 ms
129,736 KB
testcase_11 AC 381 ms
182,208 KB
testcase_12 AC 139 ms
96,520 KB
testcase_13 AC 431 ms
258,368 KB
testcase_14 AC 417 ms
258,168 KB
testcase_15 AC 462 ms
257,984 KB
testcase_16 AC 434 ms
259,076 KB
testcase_17 AC 430 ms
259,144 KB
testcase_18 AC 95 ms
80,492 KB
testcase_19 AC 91 ms
79,032 KB
testcase_20 AC 97 ms
81,016 KB
testcase_21 AC 97 ms
81,504 KB
testcase_22 AC 89 ms
79,396 KB
testcase_23 AC 102 ms
82,520 KB
testcase_24 AC 99 ms
80,628 KB
testcase_25 AC 92 ms
79,320 KB
testcase_26 AC 113 ms
84,476 KB
testcase_27 AC 114 ms
84,292 KB
testcase_28 AC 117 ms
87,588 KB
testcase_29 AC 124 ms
93,584 KB
testcase_30 AC 214 ms
158,080 KB
testcase_31 AC 272 ms
198,272 KB
testcase_32 AC 352 ms
174,848 KB
testcase_33 AC 222 ms
115,636 KB
testcase_34 AC 302 ms
186,024 KB
testcase_35 AC 311 ms
172,312 KB
testcase_36 AC 297 ms
183,584 KB
testcase_37 AC 267 ms
158,168 KB
testcase_38 AC 319 ms
198,540 KB
testcase_39 AC 253 ms
147,260 KB
testcase_40 AC 256 ms
147,360 KB
testcase_41 AC 256 ms
147,404 KB
testcase_42 AC 73 ms
71,012 KB
testcase_43 AC 71 ms
71,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

fact = [0]*(M+1)

for i in range(2, M+1):
    if fact[i]:
        continue
    fact[i] = 1
    for j in range(i*i, M+1, i):
        if not fact[j]:
            fact[j] = j//i

v = 0
for a in A:
    ct = 0
    ind = a
    while ind > 1:
        ind = fact[ind]
        ct += 1
    v ^= ct

print('white' if v else 'black')
0