結果
問題 |
No.1665 quotient replace
|
ユーザー |
![]() |
提出日時 | 2021-09-10 12:52:55 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 359 ms |
コンパイル使用メモリ | 82,624 KB |
実行使用メモリ | 271,132 KB |
最終ジャッジ日時 | 2025-01-03 00:02:17 |
合計ジャッジ時間 | 12,788 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 19 |
ソースコード
N = int(input()) A = list(map(int,input().split())) T = [0]*(10**6+1) for i in range(2,10**3+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')