結果
問題 |
No.2751 429-like Number
|
ユーザー |
![]() |
提出日時 | 2024-05-26 14:26:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 508 ms |
コンパイル使用メモリ | 67,580 KB |
最終ジャッジ日時 | 2025-02-21 16:45:15 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 6 |
other | AC * 4 TLE * 1 -- * 17 |
ソースコード
#include <iostream> #include <cassert> using namespace std; int f(long long x) { int ret = 0; while (x % 2 == 0) { ret++; x /= 2; } for (long long i = 3; i * i <= x; i += 2) { while (x % i == 0) { ret++; x /= i; } } if (x > 2) ret++; return ret; } int main() { int Q; cin >> Q; while (Q--) { long long A; cin >> A; if (f(A) == 3) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }