結果

問題 No.2379 Burnside's Theorem
ユーザー shogo314shogo314
提出日時 2023-07-14 21:27:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 404 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 84,548 KB
最終ジャッジ日時 2023-10-14 11:25:22
合計ジャッジ時間 4,336 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
84,060 KB
testcase_01 AC 117 ms
84,148 KB
testcase_02 AC 115 ms
84,056 KB
testcase_03 AC 113 ms
84,188 KB
testcase_04 AC 114 ms
84,064 KB
testcase_05 AC 114 ms
84,320 KB
testcase_06 AC 115 ms
84,356 KB
testcase_07 AC 116 ms
84,480 KB
testcase_08 AC 112 ms
84,180 KB
testcase_09 AC 114 ms
84,472 KB
testcase_10 AC 113 ms
84,544 KB
testcase_11 AC 113 ms
84,204 KB
testcase_12 AC 116 ms
84,412 KB
testcase_13 AC 115 ms
84,276 KB
testcase_14 AC 114 ms
84,180 KB
testcase_15 AC 119 ms
84,292 KB
testcase_16 AC 120 ms
84,176 KB
testcase_17 AC 115 ms
84,296 KB
testcase_18 AC 118 ms
84,488 KB
testcase_19 AC 117 ms
84,412 KB
testcase_20 AC 116 ms
84,500 KB
testcase_21 AC 114 ms
84,480 KB
testcase_22 AC 117 ms
84,184 KB
testcase_23 AC 116 ms
84,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MAX=10**6
prime=[True for i in range(MAX+1)]
prime[0]=prime[1]=False
for i in range(2,MAX+1):
    if not prime[i]:
        continue
    for j in range(2,MAX//i+1):
        prime[i*j]=False
N=int(input())
tmp=0
for i,p in enumerate(prime):
    if p:
        if N%i==0:
            tmp+=1
            while N%i==0:
                N//=i
if N!=1:
    tmp+=1
if tmp<=2:
    print('Yes')
else:
    print('No')
0