結果

問題 No.2379 Burnside's Theorem
ユーザー Ekiben542Ekiben542
提出日時 2023-07-14 21:44:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 2,167 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 76,248 KB
最終ジャッジ日時 2023-10-14 11:49:49
合計ジャッジ時間 3,364 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,980 KB
testcase_01 AC 71 ms
71,448 KB
testcase_02 AC 71 ms
71,620 KB
testcase_03 AC 71 ms
71,612 KB
testcase_04 AC 77 ms
75,976 KB
testcase_05 AC 74 ms
76,228 KB
testcase_06 AC 73 ms
71,668 KB
testcase_07 AC 71 ms
71,488 KB
testcase_08 AC 74 ms
76,108 KB
testcase_09 AC 70 ms
71,800 KB
testcase_10 AC 75 ms
76,032 KB
testcase_11 AC 72 ms
71,716 KB
testcase_12 AC 76 ms
76,008 KB
testcase_13 AC 82 ms
76,096 KB
testcase_14 AC 84 ms
76,248 KB
testcase_15 AC 85 ms
76,024 KB
testcase_16 AC 75 ms
75,944 KB
testcase_17 AC 73 ms
75,964 KB
testcase_18 AC 77 ms
76,244 KB
testcase_19 AC 72 ms
71,756 KB
testcase_20 AC 72 ms
71,728 KB
testcase_21 AC 72 ms
71,716 KB
testcase_22 AC 72 ms
71,064 KB
testcase_23 AC 71 ms
71,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
for i in range(2, int(N**(0.5))+1):
    if N % i == 0:
        a = 0
        while N % i == 0:
            N //= i
            a += 1
        if N == 1:
            print("Yes")
            exit()
        for j in range(2, int(N**(0.5))+1):
            if N % j == 0:
                b = 0
                while N % j == 0:
                    N //= j
                    b += 1
                if N == 1:
                    print("Yes")
                    exit()
                else:
                    print("No")
                    exit()
        else:
            print("Yes")
            exit()
else:
    print("Yes")

0