結果
| 問題 |
No.1665 quotient replace
|
| コンテスト | |
| ユーザー |
shakayami
|
| 提出日時 | 2021-09-03 21:37:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 1,441 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 203,544 KB |
| 最終ジャッジ日時 | 2024-12-15 10:57:10 |
| 合計ジャッジ時間 | 47,141 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 TLE * 7 |
ソースコード
def prime_count(K):
res=0
p=2
while(p*p<=K):
while(K%p==0):
res+=1
K//=p
p+=1
if K>1:
res+=1
return res
N=int(input())
A=[int(i) for i in input().split()]
X=[prime_count(a) for a in A]
Grundy=0
for i in range(N):
Grundy^=X[i]
if Grundy==0:
print("black")
else:
print("white")
shakayami