結果
問題 |
No.2379 Burnside's Theorem
|
ユーザー |
![]() |
提出日時 | 2023-07-17 23:54:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 470 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 59,020 KB |
最終ジャッジ日時 | 2024-09-17 23:59:41 |
合計ジャッジ時間 | 2,486 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
def fact(n): _N = n #上限 ans = [] i = 2 while i*i <= _N: if n%i == 0: cnt = 0 while n%i == 0: cnt += 1 n //= i ans.append([i,cnt]) #[素因数,個数] else: i += 1 if n != 1: ans.append([n,1]) return ans N = int(input()) K = fact(N) if len(K) <= 2: print("Yes") else: print("No")