結果

問題 No.1665 quotient replace
コンテスト
ユーザー rin204
提出日時 2021-09-03 21:38:23
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 1,615 ms / 3,000 ms
コード長 309 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 344 ms
コンパイル使用メモリ 85,140 KB
実行使用メモリ 224,516 KB
最終ジャッジ日時 2026-05-25 23:03:11
合計ジャッジ時間 14,824 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
alst = list(map(int, input().split()))
x = 0

for a in alst:
    cnt = 0
    j = 2
    while j * j <= a:
        while a % j == 0:
            a //= j
            cnt += 1
        j += 1
    if a != 1:
        cnt += 1
    x ^= cnt
    
if x == 0:
    print("black")
else:
    print("white")
0