結果

問題 No.810 割った余りの個数
ユーザー uedayuji
提出日時 2020-08-31 18:50:29
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 12,535 ms
コンパイル使用メモリ 400,964 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-16 21:27:03
合計ジャッジ時間 13,818 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::cmp;
fn main() {
  let input = read_vec::<usize>();
  println!("{}", cmp::min(input[1] - input[0] + 1, input[2]));
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace()
      .map(|e| e.parse().ok().unwrap()).collect()
}
0