結果

問題 No.207 世界のなんとか
コンテスト
ユーザー Yusuke Wada
提出日時 2020-07-10 11:10:22
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 5,000 ms
+ 860µs
コード長 620 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,644 ms
コンパイル使用メモリ 182,700 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-12 23:00:02
合計ジャッジ時間 3,640 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: variable `A` should have a snake case name
  --> src/main.rs:10:9
   |
10 |     let A: u64 = a[0].parse().unwrap();
   |         ^ help: convert the identifier to snake case: `a`
   |
   = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default

warning: variable `B` should have a snake case name
  --> src/main.rs:11:9
   |
11 |     let B: u64 = a[1].parse().unwrap();
   |         ^ help: convert the identifier to snake case: `b`

ソースコード

diff #
raw source code

fn getline() -> String {
    let mut __ret = String::new();
    std::io::stdin().read_line(&mut __ret).ok();
    return __ret;
}

fn main() {
    let s = getline();
    let a: Vec<_> = s.trim().split(' ').collect();
    let A: u64 = a[0].parse().unwrap();
    let B: u64 = a[1].parse().unwrap();

    for n in A..=B {
        let day_char = n.to_string().chars().collect::<Vec<char>>();
        if day_char.contains(&'3') || n % 3 == 0 {
            println!("{}", n);
        }
    }

    // let input = &args[0];
    // let range = 1..=input.parse::<u64>().unwrap();
    //
    // println!("{}", range.sum::<u4>());
}
0