結果
| 問題 |
No.2379 Burnside's Theorem
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-02-05 02:26:17 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,032 bytes |
| コンパイル時間 | 4,557 ms |
| コンパイル使用メモリ | 274,664 KB |
| 実行使用メモリ | 17,088 KB |
| 最終ジャッジ日時 | 2025-02-05 02:27:22 |
| 合計ジャッジ時間 | 63,422 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 TLE * 1 |
| other | AC * 2 TLE * 18 |
ソースコード
//Ya to win hai ya learn hai 2.0
#include <bits/stdc++.h>
#include <algorithm>
#define int long long
using namespace std;
#define fastnuces ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t = 1;
bool isprime(int a)
{
for(int i=2;i<sqrt(a);i++)
{
if(a%i==0)
{
return false;
}
}
return true;
}
bool check(int a)
{
int prime=2;int check;
while(true)
{
check=log(a)/log(prime);
if(check==(log(a)/log(prime)))
{
return true;
}
else
{
while(true)
{
bool check=isprime(++prime);
if(check==true)
{
break;
}
}
}
if(prime>a)
{
return false;
}
}
}
void solve()
{
int n;int prime=2;cin>>n;
for(int i=1;i<=sqrt(n);i++)
{
if((n/i)*i==n)
{
if(check(n/i)==true && check(i)==true)
{
cout<<"Yes";return;
}
}
}
cout<<"No";
}
signed main() {
fastnuces;
//cin>>t;
while (t--) {
solve();
cout<<endl;
}
return 0;
}
vjudge1