結果

問題 No.804 野菜が苦手
コンテスト
ユーザー ixTL255
提出日時 2023-01-22 21:01:15
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 774µs
コード長 552 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 735 ms
コンパイル使用メモリ 195,828 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-19 03:11:14
合計ジャッジ時間 2,382 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use std::collections::BTreeSet;
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let a: isize = itr.next().unwrap().parse().unwrap();
    let b: isize = itr.next().unwrap().parse().unwrap();
    let c: isize = itr.next().unwrap().parse().unwrap();
    let d: isize = itr.next().unwrap().parse().unwrap();

    let mut set = BTreeSet::new();
    set.insert(a);
    set.insert(b / c);
    set.insert(d / (c + 1));

    println!("{}", set.iter().next().unwrap());
}
0