結果
| 問題 | 
                            No.2379 Burnside's Theorem
                             | 
                    
| コンテスト | |
| ユーザー | 
                             vjudge1
                         | 
                    
| 提出日時 | 2025-02-06 20:09:32 | 
| 言語 | C++17(gcc12)  (gcc 12.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 551 bytes | 
| コンパイル時間 | 12,350 ms | 
| コンパイル使用メモリ | 251,724 KB | 
| 実行使用メモリ | 13,952 KB | 
| 最終ジャッジ日時 | 2025-02-06 20:10:50 | 
| 合計ジャッジ時間 | 74,420 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 TLE * 1 | 
| other | AC * 1 TLE * 19 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n)
{
    for (int i = 2; i <= sqrt(n); i++)
    {
        if (n % i == 0)
            return false;
    }
    return true;
}
int main()
{
    long long int n = 0;
    cin >> n;
    int count = 0;
    for (long long i = 2; i <= n; i++)
    {
        if (isPrime(i))
        {
            if (n % i == 0)
            {
                count++;
            }
        }
    }
    if (count > 2)
    {
        cout << "No" << endl;
    }
    else
    {
        cout << "Yes" << endl;
    }
}
            
            
            
        
            
vjudge1