結果

問題 No.2751 429-like Number
ユーザー Yukino DX.Yukino DX.
提出日時 2024-05-13 18:19:23
言語 Rust
(1.77.0)
結果
TLE  
実行時間 -
コード長 464 bytes
コンパイル時間 12,357 ms
コンパイル使用メモリ 405,620 KB
実行使用メモリ 9,120 KB
最終ジャッジ日時 2024-05-13 18:19:57
合計ジャッジ時間 31,154 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 4 ms
6,940 KB
testcase_03 AC 4 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 13 ms
6,944 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
        q:usize,
        a:[usize;q],
    }

    for ai in a {
        let mut p = 0;
        let mut x = ai;
        for d in (2..).take_while(|&d| d * d <= 10000000000) {
            while x % d == 0 {
                x /= d;
                p += 1;
            }
        }
        if x != 1 {
            p += 1;
        }

        let ans = p == 3;
        println!("{}", if ans { "Yes" } else { "No" });
    }
}
0