結果
問題 | No.677 10^Nの約数 |
ユーザー | nekoziroo |
提出日時 | 2018-05-26 17:50:24 |
言語 | Rust (1.77.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 558 bytes |
コンパイル時間 | 3,035 ms |
コンパイル使用メモリ | 141,896 KB |
実行使用メモリ | 4,508 KB |
最終ジャッジ日時 | 2023-09-11 03:41:28 |
合計ジャッジ時間 | 4,191 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
ソースコード
use std::f32; 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.split_whitespace().collect(); let a: i16 = line[0].parse().unwrap(); let b: i16 = line[1].parse().unwrap(); let mut result = 0; for i in a..b + 1 { let sum = a + b + i; let average = sum as f32 / 3.0; if average.fract() == 0.0 { result += 1; } } println!("{}", result); }