結果

問題 No.1665 quotient replace
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-09-03 22:58:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 382 ms / 3,000 ms
コード長 412 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 248,612 KB
最終ジャッジ日時 2023-08-22 00:16:24
合計ジャッジ時間 14,960 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 195 ms
92,652 KB
testcase_01 AC 191 ms
92,760 KB
testcase_02 AC 195 ms
92,660 KB
testcase_03 AC 212 ms
92,520 KB
testcase_04 AC 210 ms
92,584 KB
testcase_05 AC 212 ms
92,760 KB
testcase_06 AC 214 ms
92,608 KB
testcase_07 AC 208 ms
92,656 KB
testcase_08 AC 217 ms
92,748 KB
testcase_09 AC 213 ms
95,540 KB
testcase_10 AC 282 ms
137,824 KB
testcase_11 AC 343 ms
188,548 KB
testcase_12 AC 212 ms
104,720 KB
testcase_13 AC 374 ms
248,612 KB
testcase_14 AC 371 ms
247,172 KB
testcase_15 AC 382 ms
247,404 KB
testcase_16 AC 379 ms
248,116 KB
testcase_17 AC 378 ms
247,452 KB
testcase_18 AC 201 ms
92,460 KB
testcase_19 AC 203 ms
92,572 KB
testcase_20 AC 199 ms
92,596 KB
testcase_21 AC 192 ms
92,444 KB
testcase_22 AC 193 ms
92,632 KB
testcase_23 AC 193 ms
92,656 KB
testcase_24 AC 194 ms
92,460 KB
testcase_25 AC 193 ms
92,756 KB
testcase_26 AC 193 ms
92,816 KB
testcase_27 AC 197 ms
92,672 KB
testcase_28 AC 197 ms
96,136 KB
testcase_29 AC 214 ms
101,844 KB
testcase_30 AC 291 ms
166,064 KB
testcase_31 AC 346 ms
206,640 KB
testcase_32 AC 323 ms
178,452 KB
testcase_33 AC 254 ms
126,240 KB
testcase_34 AC 293 ms
177,836 KB
testcase_35 AC 286 ms
166,988 KB
testcase_36 AC 303 ms
177,332 KB
testcase_37 AC 298 ms
165,920 KB
testcase_38 AC 311 ms
189,028 KB
testcase_39 AC 286 ms
155,212 KB
testcase_40 AC 287 ms
155,160 KB
testcase_41 AC 283 ms
155,392 KB
testcase_42 AC 198 ms
92,644 KB
testcase_43 AC 201 ms
92,656 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