結果

問題 No.1665 quotient replace
ユーザー lloyzlloyz
提出日時 2021-11-29 21:20:26
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 427 bytes
コンパイル時間 2,780 ms
コンパイル使用メモリ 86,556 KB
実行使用メモリ 124,804 KB
最終ジャッジ日時 2023-09-15 09:34:19
合計ジャッジ時間 14,495 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,380 KB
testcase_01 AC 70 ms
71,276 KB
testcase_02 AC 69 ms
71,104 KB
testcase_03 AC 87 ms
76,140 KB
testcase_04 AC 88 ms
76,116 KB
testcase_05 AC 77 ms
75,852 KB
testcase_06 AC 143 ms
76,308 KB
testcase_07 AC 93 ms
76,660 KB
testcase_08 AC 115 ms
76,336 KB
testcase_09 AC 280 ms
79,920 KB
testcase_10 AC 2,179 ms
124,804 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))

P = [0 for _ in range(n)]
for i in range(n):
    m = A[i]
    while m % 2 == 0:
        P[i] += 1
        m //= 2
    f = 3
    while f * f <= A[i]:
        while m % f == 0:
            P[i] += 1
            m //= f
        f += 2
    if m != 1:
        P[i] += 1

state = 0
for i in range(n):
    state ^= P[i]

if state == 0:
    print("black")
else:
    print("white")
0