結果

問題 No.207 世界のなんとか
コンテスト
ユーザー nekoziroo
提出日時 2018-05-28 14:59:28
言語 Rust
(1.93.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
WA  
実行時間 -
コード長 801 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,727 ms
コンパイル使用メモリ 187,904 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-20 02:27:27
合計ジャッジ時間 1,625 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use std::i32;
use std::io::stdin;

fn get_line() -> String {
    let mut line = String::new();
    stdin().read_line(&mut line).ok();
    line
}

fn main() {
    let line = get_line();
    let line: Vec<&str> = line.trim().split_whitespace().collect();
    let line: Vec<i32> = line.iter().map(|x| x.parse().unwrap()).collect();

    let a = line[0];
    let b = line[1];

    let mut results: Vec<i32> = Vec::new();

    for i in a..b + 1 {
        if i % 3 == 0 {
            results.push(i);
        } else {
            let str = i.to_string();
            let str = str.as_str();
            for j in str.chars() {
                if j == '3' {
                    results.push(i);
                }
            }
        }
    }

    for i in results.iter() {
        println!("{}", i);
    }
}
0