結果
| 問題 | No.3259 C++ → Rust → Python |
| コンテスト | |
| ユーザー |
lp_ql
|
| 提出日時 | 2025-09-06 13:04:15 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 2,000 ms |
| + 816µs | |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 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
ソースコード
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)
}
lp_ql