結果

問題 No.2379 Burnside's Theorem
ユーザー hiro1729hiro1729
提出日時 2023-07-21 11:20:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 351 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 11,928 KB
実行使用メモリ 10,212 KB
最終ジャッジ日時 2023-10-21 12:14:43
合計ジャッジ時間 2,269 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,212 KB
testcase_01 AC 30 ms
10,212 KB
testcase_02 AC 30 ms
10,212 KB
testcase_03 AC 52 ms
10,212 KB
testcase_04 AC 32 ms
10,212 KB
testcase_05 AC 32 ms
10,212 KB
testcase_06 AC 31 ms
10,212 KB
testcase_07 AC 33 ms
10,212 KB
testcase_08 AC 33 ms
10,212 KB
testcase_09 AC 33 ms
10,212 KB
testcase_10 AC 31 ms
10,152 KB
testcase_11 AC 32 ms
10,212 KB
testcase_12 AC 34 ms
10,212 KB
testcase_13 AC 78 ms
10,212 KB
testcase_14 AC 97 ms
10,212 KB
testcase_15 AC 115 ms
10,152 KB
testcase_16 AC 40 ms
10,212 KB
testcase_17 AC 34 ms
10,212 KB
testcase_18 AC 103 ms
10,212 KB
testcase_19 AC 52 ms
10,212 KB
testcase_20 AC 71 ms
10,212 KB
testcase_21 AC 88 ms
10,212 KB
testcase_22 AC 30 ms
10,120 KB
testcase_23 AC 90 ms
10,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def factorize(n: int) -> list:
    r = []
    for p in range(2, int(n ** 0.5) + 1):
        if n % p != 0:
            continue
        e = 0
        while n % p == 0:
            n //= p
            e += 1
        r.append((p, e))
    if n != 1:
        r.append((n, 1))
    return r

p = factorize(int(input()))
print("Yes" if len(p) <= 2 else "No")
0