結果

問題 No.2379 Burnside's Theorem
ユーザー komkompikomkompi
提出日時 2023-07-15 00:23:01
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 668 bytes
コンパイル時間 956 ms
コンパイル使用メモリ 86,668 KB
実行使用メモリ 121,552 KB
最終ジャッジ日時 2023-10-14 14:46:33
合計ジャッジ時間 6,203 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 137 ms
121,236 KB
testcase_03 AC 137 ms
121,232 KB
testcase_04 WA -
testcase_05 AC 138 ms
121,040 KB
testcase_06 AC 137 ms
121,292 KB
testcase_07 AC 135 ms
121,232 KB
testcase_08 WA -
testcase_09 AC 138 ms
121,536 KB
testcase_10 WA -
testcase_11 AC 135 ms
121,108 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 RE -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 141 ms
121,292 KB
testcase_20 AC 142 ms
120,936 KB
testcase_21 AC 136 ms
121,292 KB
testcase_22 WA -
testcase_23 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

def sieve_of_eratosthenes(x):
    nums = [i for i in range(x+1)]

    root = int(pow(x,0.5))
    for i in range(2,root + 1):
        if nums[i] != 0:
            for j in range(i, x+1):
                if i*j >= x+1:
                    break
                nums[i*j] = 0

    primes = sorted(list(set(nums)))[2:]
    
    return primes


primes=sieve_of_eratosthenes(10**6+2)

pool_q=set()

for prime in primes:
    temp=prime
    while temp<=10**12:
        pool_q.add(temp)
        temp*=prime

N=int(input())

for p in primes:
    q=N
    while q%p==0:
        q//=p
    
    if q in pool_q:
        exit("Yes")
    
print("No")
0