結果

問題 No.1665 quotient replace
ユーザー とりゐとりゐ
提出日時 2021-09-04 00:05:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 635 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 258,432 KB
最終ジャッジ日時 2024-05-09 08:28:29
合計ジャッジ時間 13,243 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
69,632 KB
testcase_01 WA -
testcase_02 AC 74 ms
69,504 KB
testcase_03 AC 79 ms
70,400 KB
testcase_04 AC 76 ms
71,296 KB
testcase_05 AC 75 ms
69,248 KB
testcase_06 AC 83 ms
78,720 KB
testcase_07 AC 84 ms
72,704 KB
testcase_08 WA -
testcase_09 AC 100 ms
86,656 KB
testcase_10 AC 250 ms
140,664 KB
testcase_11 AC 444 ms
191,068 KB
testcase_12 AC 118 ms
96,000 KB
testcase_13 AC 550 ms
257,916 KB
testcase_14 AC 540 ms
258,096 KB
testcase_15 AC 545 ms
257,780 KB
testcase_16 AC 539 ms
257,788 KB
testcase_17 AC 545 ms
258,432 KB
testcase_18 AC 72 ms
69,248 KB
testcase_19 WA -
testcase_20 AC 77 ms
69,120 KB
testcase_21 AC 73 ms
69,120 KB
testcase_22 AC 79 ms
69,120 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 72 ms
69,504 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#複数回素因数分解や約数列挙をする場合(n<=10^6)

#エラトステネスの篩
m=10**6
d=[-1]*(m+1)
for i in range(2,m+1):
  if d[i]==-1:
    d[i]=i
    j=2
    while i*j<=m:
      d[i*j]=i
      j+=1
#n の素因数分解
import collections
def fact(n):
  c=0
  while n!=1:
    k=d[n]
    c+=1
    n//=k
  #return c
  return c
#n の約数列挙
def div(n):
  s=set([1])
  while n!=1:
    x=d[n]
    t=s.copy()
    for i in s:
      t.add(i*x)
    n//=x
    s=t.copy()
  return s

n=int(input())
a=list(map(int,input().split()))
cnt=0
xor=0
for i in a:
  xor^=fact(i)
if xor!=1:
  print('white')
else:
  print('black')
0