結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-10 11:10:22 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 620 bytes |
| コンパイル時間 | 13,075 ms |
| コンパイル使用メモリ | 394,360 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-10-10 03:07:10 |
| 合計ジャッジ時間 | 14,397 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)]` 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`
ソースコード
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>());
}