結果
| 問題 | No.2751 429-like Number |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-09 08:52:49 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 646 bytes |
| 記録 | |
| コンパイル時間 | 1,195 ms |
| コンパイル使用メモリ | 97,748 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-20 04:05:25 |
| 合計ジャッジ時間 | 18,409 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 6 |
| other | AC * 4 WA * 18 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long ll;
typedef string str;
int main() {
ll Q;
cin >> Q;
vector<ll> A(Q);
for(ll i=0; i<Q; i++){
cin >> A[i];
}
ll counter = 0;
ll num;
for(ll j=0; j<Q; j++){
counter = 0;
num = A[j];
for(ll i=2; i <= pow(A[i], 0.5); i++){
while(num % i == 0){
num /= i;
counter++;
if(counter > 3)
goto label_break;
}
}
if(num != 1)
counter++;
label_break:
if(counter == 3)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}