結果

問題 No.2379 Burnside's Theorem
ユーザー lloyzlloyz
提出日時 2023-07-14 21:22:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 75,888 KB
最終ジャッジ日時 2023-10-14 11:17:52
合計ジャッジ時間 3,423 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,368 KB
testcase_01 AC 69 ms
71,052 KB
testcase_02 AC 67 ms
70,860 KB
testcase_03 AC 69 ms
75,460 KB
testcase_04 AC 70 ms
75,376 KB
testcase_05 AC 67 ms
71,280 KB
testcase_06 AC 67 ms
71,228 KB
testcase_07 AC 67 ms
71,276 KB
testcase_08 AC 69 ms
75,888 KB
testcase_09 AC 70 ms
75,624 KB
testcase_10 AC 70 ms
75,788 KB
testcase_11 AC 68 ms
71,052 KB
testcase_12 AC 68 ms
75,468 KB
testcase_13 AC 73 ms
75,560 KB
testcase_14 AC 73 ms
75,456 KB
testcase_15 AC 77 ms
75,820 KB
testcase_16 AC 70 ms
75,560 KB
testcase_17 AC 68 ms
75,660 KB
testcase_18 AC 70 ms
75,556 KB
testcase_19 AC 68 ms
71,092 KB
testcase_20 AC 67 ms
71,308 KB
testcase_21 AC 69 ms
71,176 KB
testcase_22 AC 69 ms
71,064 KB
testcase_23 AC 68 ms
71,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

prime_set = set()
while n % 2 == 0:
    prime_set.add(2)
    n //= 2
f = 3
while f * f <= n:
    while n % f == 0:
        prime_set.add(f)
        n //= f
    f += 2
if n != 1:
    prime_set.add(n)
if len(prime_set) <= 2:
    print("Yes")
else:
    print("No")
0