結果
| 問題 | No.2751 429-like Number |
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-05-10 21:47:04 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1,483 ms / 4,000 ms |
| コード長 | 587 bytes |
| 記録 | |
| コンパイル時間 | 1,161 ms |
| コンパイル使用メモリ | 209,984 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-04 17:11:04 |
| 合計ジャッジ時間 | 6,447 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
int pf(long long a) {
int res = 0;
while (a % 2 == 0) {
a /= 2;
res++;
}
for (long long i = 3; i * i <= a; i += 2) {
while (a % i == 0) {
a /= i;
res++;
}
}
if (a > 1) {
res++;
}
return res;
}
int main() {
fast_io();
int t;
cin >> t;
for (; t--;) {
long long a;
cin >> a;
cout << (pf(a) == 3 ? "Yes" : "No") << '\n';
}
}
eve__fuyuki