結果
| 問題 |
No.46 はじめのn歩
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-13 16:50:12 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 477 bytes |
| コンパイル時間 | 15,799 ms |
| コンパイル使用メモリ | 395,944 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-16 01:05:10 |
| 合計ジャッジ時間 | 16,292 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
use std::io::{self, Read};
fn read_stdin() -> Vec<String> {
let mut buffer = String::new();
io::stdin().read_to_string(&mut buffer).ok();
buffer.trim().split('\n').map(|s| s.to_string()).collect()
}
fn main() {
let input: Vec<usize> = read_stdin()[0].split(' ').map(|s| s.parse::<usize>().unwrap()).collect();
let a = &input[0];
let b = &input[1];
match b % a {
0 => println!("{}", b / a),
_ => println!("{}", b / a + 1),
}
}