結果

問題 No.388 階段 (1)
コンテスト
ユーザー iwot
提出日時 2019-04-23 11:11:15
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 287 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,304 ms
コンパイル使用メモリ 192,636 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-30 16:50:57
合計ジャッジ時間 9,270 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused `Result` that must be used
 --> src/main.rs:3:5
  |
3 |     std::io::stdin().read_line(&mut line);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this `Result` may be an `Err` variant, which should be handled
  = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default
help: use `let _ = ...` to ignore the resulting value
  |
3 |     let _ = std::io::stdin().read_line(&mut line);
  |     +++++++

ソースコード

diff #
raw source code

fn main() {
    let mut line = String::new();
    std::io::stdin().read_line(&mut line);
    let line: Vec<&str> = line.trim().split(" ").collect();
    let s: f64 = line[0].parse().unwrap();
    let f: f64 = line[1].parse().unwrap();
    println!("{}", ((s / f).floor() as i32) + 1);
}
0