結果

問題 No.1665 quotient replace
ユーザー satama6satama6
提出日時 2022-10-18 23:26:20
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 351 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 172,648 KB
最終ジャッジ日時 2024-06-29 05:25:00
合計ジャッジ時間 12,027 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 TLE * 2 -- * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

def factor(N):
    factor = set()

    i = 1
    while i*i <= N:
        if N % i == 0:
            factor.add(i)
            factor.add(N // i)
        i += 1
    return len(factor) - 1


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

grundy = 0

for a in A:
    grundy ^= factor(a)

if grundy == 0:
    print('black')
else:
    print('white')
0