結果

問題 No.3259 C++ → Rust → Python
ユーザー sampleuser
提出日時 2025-09-06 20:34:54
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 976 bytes
コンパイル時間 16,511 ms
コンパイル使用メモリ 396,948 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-09-06 20:35:12
合計ジャッジ時間 16,253 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused import: `HashMap`
 --> src/main.rs:6:24
  |
6 | use std::collections::{HashMap, HashSet};
  |                        ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

ソースコード

diff #

// #[rustfmt::skip]
// pub mod lib {pub use ac_library::*;pub use itertools::{join, Combinations, Itertools, MultiProduct, Permutations};pub use proconio::{input,marker::{Chars, Usize1}};pub use std::{cmp::*, collections::*, mem::swap};pub use regex::Regex;pub use superslice::Ext;pub use num_traits::{One, ToPrimitive, FromPrimitive, PrimInt};#[macro_export]macro_rules! degg {($($val:expr),+ $(,)?) => {println!("[{}:{}] {}",file!(),line!(),{let mut parts = Vec::new();$(parts.push(format!("{} = {:?}", stringify!($val), &$val));)+parts.join(", ")})}}}

// use lib::*;

use std::collections::{HashMap, HashSet};

use proconio::input;



fn main() {
    input! {
        l: usize,
        r: usize,
    }
    let mut ans = HashSet::new();

    for num in l..=r {
        if num <= 295 {
            ans.insert('c');
        } else if num <= 416 {
            ans.insert('r');
        } else {
            ans.insert('p');
        }
    }
    println!("{}", ans.len() - 1);
}
0