結果
問題 |
No.1665 quotient replace
|
ユーザー |
![]() |
提出日時 | 2021-09-10 12:55:12 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 590 ms / 3,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 304 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 253,600 KB |
最終ジャッジ日時 | 2025-01-03 00:07:28 |
合計ジャッジ時間 | 12,758 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 41 |
ソースコード
N = int(input()) A = list(map(int,input().split())) T = [0]*(10**6+1) for i in range(2,10**6+1): if T[i]==0: for j in range(i,10**6+1,i): T[j]=i XOR = [] for a in A: c = 0 while T[a]>0: c+=1 a = a//T[a] XOR.append(c) nim = 0 for xor in XOR: nim^=xor if nim==0: print('black') else: print('white')