結果

問題 No.1665 quotient replace
ユーザー SPD_9X2
提出日時 2021-09-03 21:48:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 360 ms / 3,000 ms
コード長 368 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 226,752 KB
最終ジャッジ日時 2024-12-15 12:16:38
合計ジャッジ時間 12,699 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

r ** j = n

"""

import math
import sys
from sys import stdin

dp = [0] * (10**6+1)

for i in range(1,len(dp)):
    for j in range(2*i,len(dp),i):
        dp[j] = max(dp[j] , dp[i] + 1)

#print (dp)

N = int(stdin.readline())
A = list(map(int,stdin.readline().split()))

x = 0
for a in A:
    x ^= dp[a]

if x == 0:
    print ("black")
else:
    print ("white")
0