結果

問題 No.2379 Burnside's Theorem
ユーザー dangodango
提出日時 2023-07-15 09:08:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 75,380 KB
最終ジャッジ日時 2023-10-14 23:49:13
合計ジャッジ時間 3,542 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,192 KB
testcase_01 AC 67 ms
71,204 KB
testcase_02 AC 67 ms
71,056 KB
testcase_03 AC 70 ms
75,104 KB
testcase_04 AC 71 ms
75,108 KB
testcase_05 AC 71 ms
74,868 KB
testcase_06 AC 69 ms
75,168 KB
testcase_07 AC 67 ms
71,196 KB
testcase_08 AC 68 ms
75,380 KB
testcase_09 AC 67 ms
75,008 KB
testcase_10 AC 71 ms
75,012 KB
testcase_11 AC 67 ms
71,040 KB
testcase_12 AC 69 ms
75,084 KB
testcase_13 AC 77 ms
75,024 KB
testcase_14 AC 80 ms
74,980 KB
testcase_15 AC 82 ms
74,868 KB
testcase_16 AC 69 ms
75,032 KB
testcase_17 AC 68 ms
75,100 KB
testcase_18 AC 71 ms
74,972 KB
testcase_19 AC 64 ms
70,892 KB
testcase_20 AC 63 ms
71,120 KB
testcase_21 AC 64 ms
71,196 KB
testcase_22 AC 67 ms
71,136 KB
testcase_23 AC 67 ms
70,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
def pf(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
if n == 1 or len(set(pf(n))) <= 2:
    print("Yes")
else:
    print("No")
0