結果

問題 No.3259 C++ → Rust → Python
コンテスト
ユーザー lp_ql
提出日時 2025-09-06 13:04:15
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 816µs
コード長 322 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,548 ms
コンパイル使用メモリ 180,108 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-14 18:16:25
合計ジャッジ時間 5,159 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: variable does not need to be mutable
  --> src/main.rs:17:9
   |
17 |     let mut ans: usize = f(r) - f(l);
   |         ----^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

use proconio::input;
fn main() {
    input!{
        l: usize,
        r: usize,
    }
    let f = |x: usize|{
        let mut res = 0;
        if x > 295{
            res += 1;
        }
        if x > 416{
            res += 1;
        }
        res
    };
    let mut ans: usize = f(r) - f(l);
    println!("{}", ans)
}
0