結果

問題 No.2379 Burnside's Theorem
ユーザー vjudge1
提出日時 2025-02-05 02:14:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 433 bytes
コンパイル時間 2,758 ms
コンパイル使用メモリ 192,452 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-05 02:14:50
合計ジャッジ時間 3,747 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 14 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;














using ll = long long;
bool check(ll n) {
    int count = 0;
    for (ll i = 2;i * i <= n; i++) {
        if (n %i == 0) {
            count++;
            while (n % i==0) n /= i;
        }
        if (count > 2)
return false;  
    }
    if (n> 1)
	count++;  
	
    return count == 2;
}

int main() {
    ll n;
    cin >> n;
    cout << (check(n) ?"Yes": "No") << endl;
}
0