結果

問題 No.1665 quotient replace
ユーザー 👑 H20H20
提出日時 2021-09-10 12:55:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 529 ms / 3,000 ms
コード長 362 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 258,792 KB
最終ジャッジ日時 2023-08-30 23:56:20
合計ジャッジ時間 12,463 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
84,064 KB
testcase_01 AC 102 ms
84,284 KB
testcase_02 AC 102 ms
84,184 KB
testcase_03 AC 105 ms
84,476 KB
testcase_04 AC 106 ms
84,488 KB
testcase_05 AC 103 ms
84,252 KB
testcase_06 AC 108 ms
84,716 KB
testcase_07 AC 106 ms
84,720 KB
testcase_08 AC 107 ms
84,420 KB
testcase_09 AC 115 ms
88,196 KB
testcase_10 AC 251 ms
154,852 KB
testcase_11 AC 404 ms
232,884 KB
testcase_12 AC 139 ms
102,200 KB
testcase_13 AC 510 ms
258,792 KB
testcase_14 AC 516 ms
258,272 KB
testcase_15 AC 529 ms
258,060 KB
testcase_16 AC 513 ms
258,136 KB
testcase_17 AC 516 ms
258,020 KB
testcase_18 AC 102 ms
84,036 KB
testcase_19 AC 101 ms
84,380 KB
testcase_20 AC 102 ms
84,176 KB
testcase_21 AC 103 ms
84,180 KB
testcase_22 AC 102 ms
84,136 KB
testcase_23 AC 102 ms
84,492 KB
testcase_24 AC 103 ms
84,460 KB
testcase_25 AC 104 ms
84,372 KB
testcase_26 AC 105 ms
84,640 KB
testcase_27 AC 107 ms
84,704 KB
testcase_28 AC 113 ms
89,424 KB
testcase_29 AC 123 ms
97,496 KB
testcase_30 AC 243 ms
194,380 KB
testcase_31 AC 332 ms
255,800 KB
testcase_32 AC 386 ms
223,396 KB
testcase_33 AC 230 ms
135,496 KB
testcase_34 AC 338 ms
185,808 KB
testcase_35 AC 323 ms
172,416 KB
testcase_36 AC 331 ms
183,716 KB
testcase_37 AC 317 ms
194,496 KB
testcase_38 AC 354 ms
198,652 KB
testcase_39 AC 290 ms
179,488 KB
testcase_40 AC 283 ms
179,564 KB
testcase_41 AC 289 ms
179,388 KB
testcase_42 AC 105 ms
84,384 KB
testcase_43 AC 103 ms
84,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
T = [0]*(10**6+1)
for i in range(2,10**6+1):
    if T[i]==0:
        for j in range(i,10**6+1,i):
            T[j]=i

XOR = []
for a in A:
    c = 0
    while T[a]>0:
        c+=1
        a = a//T[a]
    XOR.append(c)

nim = 0
for xor in XOR:
    nim^=xor
if nim==0:
    print('black')
else:
    print('white')
0