結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2016-08-27 15:19:45 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 733 ms |
コンパイル使用メモリ | 99,840 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 03:42:45 |
合計ジャッジ時間 | 1,616 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
import std.algorithm, std.array, std.range;import std.string, std.conv;import std.math;import std.stdio, std.typecons;void main(){auto x = readln.chomp.to!int;auto y = readln.chomp.to!int;auto l = readln.chomp.to!int;auto n = 0;n += x.abs / l + (x % l == 0 ? 0 : 1);n += y.abs / l + (y % l == 0 ? 0 : 1);if (y < 0)n += 2;else if (x.abs > 0)n += 1;writeln(n);}