結果

問題 No.1665 quotient replace
ユーザー 👑 SPD_9X2
提出日時 2021-09-03 21:47:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 240,136 KB
最終ジャッジ日時 2024-12-15 12:01:32
合計ジャッジ時間 14,736 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 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