結果

問題 No.2379 Burnside's Theorem
ユーザー monnu
提出日時 2023-07-14 21:32:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 1,301 ms
コンパイル使用メモリ 167,232 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 06:21:31
合計ジャッジ時間 1,997 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main()
{
    ll N;
    cin >> N;
    int cnt = 0;
    for (ll i = 2; i * i <= N; i++)
    {
        if (N % i == 0)
        {
            cnt++;
            while (N % i == 0)
            {
                N /= i;
            }
        }
    }
    if (N > 1)
    {
        cnt++;
    }
    if (cnt <= 2)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}
0