結果
問題 |
No.804 野菜が苦手
|
ユーザー |
![]() |
提出日時 | 2023-01-22 21:01:15 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 552 bytes |
コンパイル時間 | 23,288 ms |
コンパイル使用メモリ | 379,100 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-24 23:45:27 |
合計ジャッジ時間 | 14,317 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
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()); }