結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2015-06-25 18:07:46 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 3,861 ms |
コンパイル使用メモリ | 30,504 KB |
実行使用メモリ | 31,424 KB |
最終ジャッジ日時 | 2024-11-21 18:21:50 |
合計ジャッジ時間 | 2,014 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php$x = trim(fgets(STDIN));$y = trim(fgets(STDIN));$l = trim(fgets(STDIN));$compass = 0;$move = 0;if ( $x != 0 ) {$compass++;}if ( $y < 0 ) {$compass++;if ( $x == 0 ) {$compass++;}}$move = ceil(abs($x) / $l);$move += ceil(abs($y) / $l);echo (($move + $compass) . "\n");