結果

問題 No.2138 Add Bacon
ユーザー chocopuu
提出日時 2022-12-17 04:00:17
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 11,574 ms
コンパイル使用メモリ 382,808 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-16 09:26:24
合計ジャッジ時間 12,627 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
}
0