結果

問題 No.2379 Burnside's Theorem
ユーザー tcltktcltk
提出日時 2023-07-15 01:15:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 812 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 89,856 KB
最終ジャッジ日時 2023-10-14 15:26:58
合計ジャッジ時間 5,878 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 168 ms
80,968 KB
testcase_01 AC 176 ms
80,744 KB
testcase_02 AC 173 ms
80,908 KB
testcase_03 AC 182 ms
81,308 KB
testcase_04 AC 177 ms
81,388 KB
testcase_05 AC 179 ms
81,328 KB
testcase_06 AC 182 ms
89,560 KB
testcase_07 AC 182 ms
80,800 KB
testcase_08 AC 192 ms
89,856 KB
testcase_09 AC 170 ms
81,380 KB
testcase_10 AC 184 ms
89,800 KB
testcase_11 AC 186 ms
80,984 KB
testcase_12 AC 183 ms
81,352 KB
testcase_13 AC 176 ms
81,116 KB
testcase_14 AC 183 ms
81,232 KB
testcase_15 AC 176 ms
81,308 KB
testcase_16 AC 175 ms
81,352 KB
testcase_17 AC 186 ms
89,716 KB
testcase_18 AC 177 ms
81,256 KB
testcase_19 AC 188 ms
80,800 KB
testcase_20 AC 173 ms
80,896 KB
testcase_21 AC 175 ms
81,092 KB
testcase_22 AC 183 ms
80,768 KB
testcase_23 AC 174 ms
80,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq


def input():
    return sys.stdin.readline()[:-1]


# sys.setrecursionlimit(1000000)

# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)

INF = 10**10

YES = 'Yes'
NO = 'No'


def factorize(N):
    i = 2
    ans = dict()
    n = N
    # while i * i <= N:
    while i * i <= n:

        while n % i == 0:
            n //= i
            if i in ans:
                ans[i] += 1
            else:
                ans[i] = 1
        i += 1
    if n != 1:
        ans[n] = 1
    return list(ans.items())

def solve(N):
    fact = factorize(N)
    if len(fact) <= 2:
        return 'Yes'
    return 'No'

N = int(input())
print(solve(N))
0