結果
問題 |
No.46 はじめのn歩
|
ユーザー |
|
提出日時 | 2016-03-29 20:08:45 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 821 ms |
コンパイル使用メモリ | 111,232 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 03:16:49 |
合計ジャッジ時間 | 1,398 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import std.stdio; import std.string; import std.algorithm; import std.math; import std.conv; void main() { foreach (input; stdin.byLine) { walk(input.chomp.to!string).writeln; } } int walk(string input_str) { auto input = input_str.split(" ").map!(to!real); auto result = (input[1] / input[0]).to!int; return (result * input[0]) >= input[1] ? result : result + 1; }