結果

問題 No.2379 Burnside's Theorem
ユーザー ああいいああいい
提出日時 2023-07-14 22:02:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 75,728 KB
最終ジャッジ日時 2023-10-14 12:13:41
合計ジャッジ時間 3,287 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,188 KB
testcase_01 AC 70 ms
71,112 KB
testcase_02 AC 73 ms
71,368 KB
testcase_03 AC 72 ms
71,048 KB
testcase_04 AC 70 ms
71,048 KB
testcase_05 AC 75 ms
75,460 KB
testcase_06 AC 73 ms
71,172 KB
testcase_07 AC 73 ms
71,156 KB
testcase_08 AC 90 ms
75,692 KB
testcase_09 AC 75 ms
70,996 KB
testcase_10 AC 96 ms
75,300 KB
testcase_11 AC 73 ms
71,188 KB
testcase_12 AC 93 ms
75,292 KB
testcase_13 AC 72 ms
71,212 KB
testcase_14 AC 74 ms
71,188 KB
testcase_15 AC 75 ms
71,216 KB
testcase_16 AC 71 ms
70,996 KB
testcase_17 AC 91 ms
75,728 KB
testcase_18 AC 74 ms
71,108 KB
testcase_19 AC 74 ms
70,888 KB
testcase_20 AC 72 ms
71,252 KB
testcase_21 AC 72 ms
70,992 KB
testcase_22 AC 71 ms
71,108 KB
testcase_23 AC 71 ms
71,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

import sys
p = -1
a = 0
for i in range(2,10 * 6 + 1):
    if N % i == 0:
        p = i
        while N % i == 0:
            N //= i
            a += 1
        break
    
if p == -1:
    print('Yes')
    exit()
if N == 1:
    print('Yes')
    exit()
else:
    q = -1
    b = 0
    for i in range(2,10 ** 6 + 1):
        if N % i == 0:
            while N % i == 0:
                N //= i
            if N == 1:
                print('Yes')
            else:
                print('No')
            exit()
    print('Yes')
0