結果

問題 No.2379 Burnside's Theorem
ユーザー tcltk
提出日時 2023-07-15 01:15:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 812 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 86,912 KB
最終ジャッジ日時 2024-09-16 09:55:37
合計ジャッジ時間 4,088 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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