結果
問題 | No.2379 Burnside's Theorem |
ユーザー |
![]() |
提出日時 | 2023-07-14 23:02:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-16 08:10:06 |
合計ジャッジ時間 | 1,671 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 WA * 1 |
ソースコード
from collections import defaultdict def prime_factorize(n): a = defaultdict(int) while n % 2 == 0: a[2] += 1 n //= 2 f = 3 while f * f <= n: if n % f == 0: a[f] += 1 n //= f else: f += 2 if n != 1: a[n] += 1 return a print("Yes" if 1 <= len(prime_factorize(int(input()))) <= 2 else "No")