結果

問題 No.1665 quotient replace
ユーザー AEnAEn
提出日時 2022-09-07 00:40:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 447 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 245,200 KB
最終ジャッジ日時 2024-11-22 00:49:35
合計ジャッジ時間 50,052 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def fac(M):
    if M == 1:
        return 0
    else:
        cnt = 0
        s = 2
        while s*s<=M:
            if M%s==0:
                while M%s==0:
                    M//=s
                    cnt += 1
            s += 1
        if M>1:
            cnt += 1
        return cnt

res = 0
for i in range(N):
    res ^= fac(A[i])
if res==0:
    print('black')
else:
    print('white')
0