結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー phspls
提出日時 2022-10-24 12:14:27
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 536 bytes
コンパイル時間 14,429 ms
コンパイル使用メモリ 379,480 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-02 15:21:40
合計ジャッジ時間 19,214 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

fn solve() -> usize {
    let mut x = String::new();
    std::io::stdin().read_line(&mut x).ok();
    let x: usize = x.trim().parse().unwrap();
    for i in 2.. {
        if x % i > 0 {
            return i * x;
        }
    }
    0
}

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: usize = n.trim().parse().unwrap();
    let mut result = Vec::with_capacity(n);
    for _ in 0..n {
        result.push(solve());
    }
    for &v in result.iter() {
        println!("{}", v);
    }
}
0