結果
問題 | No.2138 Add Bacon |
ユーザー |
![]() |
提出日時 | 2022-12-17 04:00:02 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 382 bytes |
コンパイル時間 | 12,342 ms |
コンパイル使用メモリ | 379,276 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-16 09:26:04 |
合計ジャッジ時間 | 13,447 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
コンパイルメッセージ
warning: unused imports: `input`, `marker::Bytes` --> src/main.rs:1:16 | 1 | use proconio::{input, marker::Bytes}; | ^^^^^ ^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
ソースコード
use proconio::{input, marker::Bytes}; fn main() { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); let a = line .split_whitespace() .map(|x| x.parse::<i32>().unwrap()) .collect::<Vec<_>>(); let (a, b, c, d, e) = (a[0], a[1], a[2], a[3], a[4]); let ans = a - b + c * (d - e).max(0); println!("{}", ans); }