結果

問題 No.2379 Burnside's Theorem
ユーザー taro2023
提出日時 2023-07-14 21:52:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 81,648 KB
実行使用メモリ 58,360 KB
最終ジャッジ日時 2024-09-16 06:49:19
合計ジャッジ時間 1,808 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

a=int(input())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors
b=prime_factors(a)
if len(set(b)) ==2 or len(set(b)) ==1:
    print("Yes")
else:
    print("No")
0