結果

問題 No.1665 quotient replace
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-09-03 22:58:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 345 ms / 3,000 ms
コード長 412 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 82,436 KB
実行使用メモリ 244,108 KB
最終ジャッジ日時 2024-05-09 06:16:07
合計ジャッジ時間 12,155 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 162 ms
91,776 KB
testcase_01 AC 171 ms
91,628 KB
testcase_02 AC 169 ms
91,776 KB
testcase_03 AC 169 ms
91,412 KB
testcase_04 AC 163 ms
92,232 KB
testcase_05 AC 158 ms
91,648 KB
testcase_06 AC 164 ms
91,792 KB
testcase_07 AC 161 ms
91,676 KB
testcase_08 AC 172 ms
91,832 KB
testcase_09 AC 170 ms
94,352 KB
testcase_10 AC 241 ms
135,220 KB
testcase_11 AC 297 ms
184,116 KB
testcase_12 AC 179 ms
103,708 KB
testcase_13 AC 340 ms
243,640 KB
testcase_14 AC 344 ms
243,572 KB
testcase_15 AC 342 ms
243,572 KB
testcase_16 AC 345 ms
243,688 KB
testcase_17 AC 339 ms
244,108 KB
testcase_18 AC 160 ms
91,628 KB
testcase_19 AC 161 ms
91,288 KB
testcase_20 AC 160 ms
91,468 KB
testcase_21 AC 162 ms
92,084 KB
testcase_22 AC 164 ms
91,892 KB
testcase_23 AC 161 ms
91,600 KB
testcase_24 AC 162 ms
91,536 KB
testcase_25 AC 164 ms
91,776 KB
testcase_26 AC 165 ms
91,904 KB
testcase_27 AC 166 ms
91,840 KB
testcase_28 AC 169 ms
95,104 KB
testcase_29 AC 177 ms
100,764 KB
testcase_30 AC 267 ms
162,504 KB
testcase_31 AC 303 ms
194,284 KB
testcase_32 AC 311 ms
222,672 KB
testcase_33 AC 220 ms
136,444 KB
testcase_34 AC 272 ms
173,568 KB
testcase_35 AC 270 ms
163,964 KB
testcase_36 AC 271 ms
173,620 KB
testcase_37 AC 259 ms
162,556 KB
testcase_38 AC 280 ms
185,580 KB
testcase_39 AC 251 ms
151,992 KB
testcase_40 AC 257 ms
152,120 KB
testcase_41 AC 257 ms
151,900 KB
testcase_42 AC 168 ms
91,824 KB
testcase_43 AC 162 ms
91,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

m = 10**6+5
l = [1]*m
grundy = [-1]*m
grundy[1] = 0

for i in range(2,m):
    num = l[i]
    for j in range(m):
        if num >> j & 1:
            continue
        grundy[i] = j
        break
    num = 1<<grundy[i]
    for j in range(i*2,m,i):
        l[j] |= num

ans = 0
A = list(map(int,input().split()))
for a in A:
    ans ^= grundy[a]
if ans:
    print("white")
else:
    print("black")
0