結果

問題 No.1665 quotient replace
ユーザー nikumakarenikumakare
提出日時 2021-12-09 23:25:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 184,012 KB
最終ジャッジ日時 2023-09-24 15:40:18
合計ジャッジ時間 39,336 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,164 KB
testcase_01 AC 74 ms
75,408 KB
testcase_02 AC 74 ms
75,468 KB
testcase_03 AC 80 ms
76,028 KB
testcase_04 AC 85 ms
75,832 KB
testcase_05 AC 76 ms
75,644 KB
testcase_06 AC 102 ms
76,320 KB
testcase_07 AC 87 ms
76,436 KB
testcase_08 AC 94 ms
76,508 KB
testcase_09 AC 159 ms
78,180 KB
testcase_10 AC 941 ms
102,488 KB
testcase_11 AC 2,038 ms
160,288 KB
testcase_12 AC 295 ms
83,628 KB
testcase_13 AC 2,653 ms
183,444 KB
testcase_14 AC 2,644 ms
182,916 KB
testcase_15 AC 2,645 ms
184,012 KB
testcase_16 AC 2,647 ms
183,296 KB
testcase_17 AC 2,663 ms
183,388 KB
testcase_18 AC 72 ms
75,484 KB
testcase_19 WA -
testcase_20 AC 73 ms
75,340 KB
testcase_21 AC 73 ms
75,176 KB
testcase_22 AC 73 ms
75,448 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 73 ms
75,420 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 75 ms
75,516 KB
testcase_43 AC 73 ms
75,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=[int(i) for i in input().split()]
ans=0
sosu=[]
fu=[0 for i in range(1001)]
for i in range(2,1001):
    if fu[i]==0:
        sosu.append(i)
        for q in range(i,1001,i):
            fu[q]=1

for num in A:
    sub=0
    for i in sosu:
        while num%i==0:
            num//=i
            sub+=1
        if num==1:
            break
    ans^=sub
print("white") if ans else print("black")
0