結果

問題 No.1423 Triangle of Multiples
ユーザー uw_yu1rabbit
提出日時 2021-03-12 21:48:54
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 681 bytes
コンパイル時間 13,090 ms
コンパイル使用メモリ 391,356 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-14 12:08:21
合計ジャッジ時間 14,079 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#[allow(dead_code)]
#[allow(unused_imports)]
fn read<T: std::str::FromStr>() -> T {
    use std::io::*;
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn solve() {
    let mut abc:Vec<i64> = (0..3).map(|_| read()).collect();
    abc.sort();
    println!("{} {} {}", abc[0] * abc[2], abc[1] * abc[1], abc[2] * abc[1]);
}

fn main(){
    let n:usize = read();
    for _ in 0..n {
        solve();
    }
}
0