結果
| 問題 | No.2751 429-like Number |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-10 23:17:34 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2,965 ms / 4,000 ms |
| コード長 | 616 bytes |
| 記録 | |
| コンパイル時間 | 1,215 ms |
| コンパイル使用メモリ | 209,352 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 17:33:30 |
| 合計ジャッジ時間 | 10,992 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 22 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
template<class T> bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;}
template<class T> bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int Q;
cin>>Q;
while(Q--){
ll A;
cin>>A;
int cnt=0;
for(ll x=2;x*x<=A;x++){
if(A%x==0){
while(A>0&&A%x==0){
cnt++;
A/=x;
}
}
}
if(A>1)cnt++;
if(cnt==3)cout<<"Yes\n";
else cout<<"No\n";
}
}