結果
問題 |
No.2751 429-like Number
|
ユーザー |
![]() |
提出日時 | 2024-05-10 21:31:09 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 929 bytes |
コンパイル時間 | 2,853 ms |
コンパイル使用メモリ | 244,156 KB |
実行使用メモリ | 10,016 KB |
最終ジャッジ日時 | 2024-12-20 04:26:16 |
合計ジャッジ時間 | 36,554 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 6 |
other | AC * 21 TLE * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; using pll=pair<ll,ll>; using tll=tuple<ll,ll,ll>; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template<class T> inline bool chmin(T &a,T b){ if(a>b){ a=b; return true; } return false; } template<class T> inline bool chmax(T &a,T b){ if(a<b){ a=b; return true; } return false; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll q; cin >> q; while(q--){ ll a; cin >> a; ll cnt=0; for(ll i=2;i*i<=a;i++){ if(a%i!=0) continue; while(a%i==0&&cnt<3){ a/=i; cnt++; } if(3<cnt) break; } if(a!=1) cnt++; if(cnt==3) cout << "Yes\n"; else cout << "No\n"; } }