結果

問題 No.1665 quotient replace
ユーザー minimumminimum
提出日時 2021-09-03 21:55:15
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 422 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 311,864 KB
最終ジャッジ日時 2024-12-15 12:55:25
合計ジャッジ時間 81,039 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 TLE * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
x = 0
for a in A:
    i = 2
    ans = dict()
    n = a
    while i * i <= a:
        while n % i==0:
            n = n // i
            if i in ans:
                ans[i] += 1
            else:
                ans[i] = 1
        i += 1
    if n != 1:
        ans[n] = 1
    res = 0
    for c in ans:
        res += ans[c]
    x ^= res
print(["white", "black"][x == 0])
0