結果

問題 No.1665 quotient replace
ユーザー nikumakare
提出日時 2021-12-09 23:25:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 372 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 179,148 KB
最終ジャッジ日時 2024-07-17 16:25:27
合計ジャッジ時間 42,190 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 19 TLE * 4
権限があれば一括ダウンロードができます

ソースコード

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
    ans^=sub
print("white") if ans else print("black")
0