No.2379 Burnside's Theorem
問題文最終更新日: 2023-05-19 20:17:02
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 397 (群論コンテスト)
(順位表)
の他の問題:
Problem Statement
According to Burnside's theorem, for primes $p,q$ and non-negative integers $a,b$, every group of order $p^aq^b$ is solvable.
You are given a positive integer $N$. Determine whether it can be expressed as $N=p^aq^b$ using primes $p,q$ and non-negative integers $a,b$.
Constraints
$N$ is an integer satisfying $1\le N\le 10^{12}$.Input
$N$
Output
Print Yes if it can be expressed as $N=p^aq^b$, and No otherwise.
Sample
Sample 1
Input
45
Output
Yes
It can be expressed as $45=3^2\times 5^1$.
Sample 2
Input
1024
Output
Yes
It can be expressed as $1024=2^{10}\times 3^0$.
Sample 3
Input
168
Output
No
Sample 4
Input
123456789000
Output
No
Note that the input may not fit in a 32bit integer.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。