結果

問題 No.46 はじめのn歩
ユーザー nomeaning
提出日時 2019-04-12 05:34:49
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 15,791 ms
コンパイル使用メモリ 399,544 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-09-13 11:44:28
合計ジャッジ時間 15,535 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
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)]` on by default
help: use `let _ = ...` to ignore the resulting value
  |
3 |     let _ = std::io::stdin().read_line(&mut line);
  |     +++++++

ソースコード

diff #

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