結果
問題 |
No.716 距離
|
ユーザー |
|
提出日時 | 2019-08-06 10:47:30 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 36 ms / 2,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 70 ms |
コンパイル使用メモリ | 31,112 KB |
実行使用メモリ | 31,616 KB |
最終ジャッジ日時 | 2024-07-18 13:51:53 |
合計ジャッジ時間 | 2,450 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $inputNum=(int)trim(fgets(STDIN)); $point=explode(" ",trim(fgets(STDIN))); $maxLength=$point[$inputNum-1]-$point[0]; $minLength=PHP_INT_MAX; for($i=1;$i<$inputNum;$i++){ $length=$point[$i]-$point[$i-1]; if($length<$minLength){ $minLength=$length; } } echo $minLength."\n"; echo $maxLength;