結果

問題 No.135 とりあえず1次元の問題
ユーザー mondomondo
提出日時 2019-08-06 00:49:26
言語 PHP
(8.2.11)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 245 bytes
コンパイル時間 632 ms
コンパイル使用メモリ 11,996 KB
実行使用メモリ 24,412 KB
最終ジャッジ日時 2023-09-25 17:36:51
合計ジャッジ時間 2,268 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
24,412 KB
testcase_01 AC 7 ms
12,400 KB
testcase_02 AC 7 ms
12,392 KB
testcase_03 AC 7 ms
12,396 KB
testcase_04 AC 7 ms
12,340 KB
testcase_05 AC 7 ms
12,348 KB
testcase_06 AC 7 ms
12,460 KB
testcase_07 AC 8 ms
12,308 KB
testcase_08 AC 7 ms
12,424 KB
testcase_09 AC 7 ms
12,340 KB
testcase_10 AC 8 ms
12,344 KB
testcase_11 AC 8 ms
12,380 KB
testcase_12 AC 8 ms
12,384 KB
testcase_13 AC 7 ms
12,412 KB
testcase_14 AC 8 ms
12,312 KB
testcase_15 AC 8 ms
12,400 KB
testcase_16 AC 8 ms
12,348 KB
testcase_17 AC 9 ms
12,420 KB
testcase_18 AC 7 ms
12,348 KB
testcase_19 AC 8 ms
12,388 KB
testcase_20 AC 8 ms
12,424 KB
testcase_21 AC 14 ms
20,048 KB
testcase_22 AC 136 ms
24,388 KB
evil01.txt AC 140 ms
24,496 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$num = explode(" ", trim(fgets(STDIN)));
$newnum = array_unique($num);
rsort($newnum);
$array = array();
for ($i = 0; $i < count($newnum); $i++){
    $array[] = abs($newnum[$i] - $newnum[$i-1]);
}
echo min($array);
0