結果
| 問題 | 
                            No.2379 Burnside's Theorem
                             | 
                    
| コンテスト | |
| ユーザー | 
                             vjudge1
                         | 
                    
| 提出日時 | 2025-02-18 03:12:30 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 666 bytes | 
| コンパイル時間 | 3,317 ms | 
| コンパイル使用メモリ | 279,880 KB | 
| 実行使用メモリ | 10,020 KB | 
| 最終ジャッジ日時 | 2025-02-18 03:12:37 | 
| 合計ジャッジ時間 | 6,801 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | TLE * 1 -- * 19 | 
ソースコード
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define fastnuces            \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);             \
    int t = 1;
void solve()
{
    int x;
    cin >> x;
    map<int, int> freq;
    int i = 2;
    while (x != 1)
    {
        if (x % i == 0)
        {
            freq[i]++;
            x /= pow(i, log(x) / log(i));
        }
        i++;
        if (freq.size() > 2)
        {
            cout << "No";
            return;
        }
    }
    cout << "Yes";
}
signed main()
{
    fastnuces;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
            
            
            
        
            
vjudge1