結果

問題 No.2014 Eggs Hatching
ユーザー taisuke
提出日時 2022-10-15 15:33:06
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 494 bytes
コンパイル時間 11,823 ms
コンパイル使用メモリ 401,144 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 19:55:15
合計ジャッジ時間 13,076 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused import: `std::fs::read`
 --> src/main.rs:1:5
  |
1 | use std::fs::read;
  |     ^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

ソースコード

diff #

use std::fs::read;

fn main() {
    // use std::io::stdin
    // 標準入力からスペース区切りで与えられるa1,a2,a3を出力する
    let mut a = String::new();
    std::io::stdin().read_line(&mut a).unwrap();
    let a: Vec<f64> = a.split_whitespace().map(|x| x.parse().unwrap()).collect();
    // println!("{} {} {}", a[0], a[1], a[2]);

    // aの最小値を出力する
    let min = a.iter().min_by(|x, y| x.partial_cmp(y).unwrap()).unwrap();
    println!("{}", min);

}
0