結果

問題 No.2379 Burnside's Theorem
ユーザー n_nan_na
提出日時 2023-07-17 23:54:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 81,688 KB
実行使用メモリ 57,148 KB
最終ジャッジ日時 2023-10-18 03:08:59
合計ジャッジ時間 2,417 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,368 KB
testcase_01 AC 38 ms
53,368 KB
testcase_02 AC 38 ms
53,368 KB
testcase_03 AC 46 ms
57,148 KB
testcase_04 AC 42 ms
57,148 KB
testcase_05 AC 41 ms
57,148 KB
testcase_06 AC 41 ms
57,148 KB
testcase_07 AC 41 ms
57,148 KB
testcase_08 AC 42 ms
57,148 KB
testcase_09 AC 41 ms
57,148 KB
testcase_10 AC 40 ms
57,148 KB
testcase_11 AC 41 ms
57,148 KB
testcase_12 AC 41 ms
57,148 KB
testcase_13 AC 48 ms
57,148 KB
testcase_14 AC 51 ms
57,148 KB
testcase_15 AC 54 ms
57,148 KB
testcase_16 AC 44 ms
57,148 KB
testcase_17 AC 42 ms
57,148 KB
testcase_18 AC 55 ms
57,148 KB
testcase_19 AC 47 ms
57,148 KB
testcase_20 AC 51 ms
57,148 KB
testcase_21 AC 55 ms
57,148 KB
testcase_22 AC 40 ms
53,368 KB
testcase_23 AC 56 ms
57,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0