結果

問題 No.2379 Burnside's Theorem
ユーザー hato336hato336
提出日時 2023-07-14 21:28:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 721 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 76,128 KB
最終ジャッジ日時 2023-10-14 11:26:11
合計ジャッジ時間 3,732 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,652 KB
testcase_01 AC 68 ms
71,844 KB
testcase_02 AC 66 ms
71,952 KB
testcase_03 AC 83 ms
75,988 KB
testcase_04 AC 69 ms
75,676 KB
testcase_05 AC 69 ms
75,792 KB
testcase_06 AC 71 ms
75,812 KB
testcase_07 AC 71 ms
75,888 KB
testcase_08 AC 74 ms
75,932 KB
testcase_09 AC 71 ms
75,788 KB
testcase_10 AC 71 ms
75,888 KB
testcase_11 AC 69 ms
76,032 KB
testcase_12 AC 72 ms
76,028 KB
testcase_13 AC 77 ms
75,648 KB
testcase_14 AC 80 ms
75,856 KB
testcase_15 AC 82 ms
75,820 KB
testcase_16 AC 71 ms
75,708 KB
testcase_17 AC 74 ms
75,700 KB
testcase_18 AC 105 ms
76,128 KB
testcase_19 AC 78 ms
75,788 KB
testcase_20 AC 86 ms
75,892 KB
testcase_21 AC 94 ms
75,956 KB
testcase_22 AC 68 ms
71,568 KB
testcase_23 AC 99 ms
75,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def factorization(n):
    relist = []
    if n == 1:
        relist = 1
    for i in range(2, int(n ** 0.5) + 1): #割る数
        while n % i == 0:
            relist.append(i)
            n /= i
    if n != 1:
        relist.append(int(n))
    return relist    
n = int(input())
if n == 1:
    print('Yes')
    exit()
print('Yes' if len(set(factorization(n))) <= 2 else 'No')
0