結果
| 問題 |
No.1665 quotient replace
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-04 01:20:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 616 bytes |
| コンパイル時間 | 745 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 249,760 KB |
| 最終ジャッジ日時 | 2024-12-15 22:10:15 |
| 合計ジャッジ時間 | 49,115 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 TLE * 7 |
ソースコード
#!/usr/bin/env python3
import sys
import functools
def main():
N = int(input())
A = list(map(int, input().split()))
def primeFactrization(n: int) -> list:
primeFactors = list()
i = 2
while i * i <= n:
while n % i == 0:
primeFactors.append(i)
n //= i
i += 1
if n != 1:
primeFactors.append(n)
return primeFactors
pf = [len(primeFactrization(aa)) for aa in A]
ans = 0
for i in pf:
ans ^= i
print("white" if ans else "black")
return
if __name__ == '__main__':
main()