結果

問題 No.2751 429-like Number
ユーザー Xinyuan Huang
提出日時 2024-12-25 11:55:20
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 489 bytes
コンパイル時間 6,134 ms
コンパイル使用メモリ 273,788 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-25 11:55:54
合計ジャッジ時間 29,518 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 21 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
 
using i64 = long long;

int solve() {
    i64 n; std::cin >> n;
    int cnt = 0;
    for (i64 i = 2; i * i <= n; ++i) {
        while (n % i == 0) {
            n /= i;
            cnt += 1;
        }
        if (cnt > 3) break;
    }
    if (n > 1) cnt += 1;
    std::cout << (cnt == 3 ? "Yes" : "No") << '\n';
    return 0;   
}

int main() {
    std::cin.tie(nullptr)->sync_with_stdio(false);
    int _; std::cin >> _;
    while (_--) solve();
    return 0;
}
0