結果

問題 No.135 とりあえず1次元の問題
ユーザー GoryudyumaGoryudyuma
提出日時 2015-03-08 02:36:54
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 18,732 KB
実行使用メモリ 37,276 KB
最終ジャッジ日時 2023-09-01 03:01:35
合計ジャッジ時間 2,311 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 157 ms
37,200 KB
testcase_01 AC 15 ms
18,832 KB
testcase_02 AC 17 ms
18,900 KB
testcase_03 WA -
testcase_04 AC 15 ms
18,852 KB
testcase_05 AC 15 ms
18,896 KB
testcase_06 AC 15 ms
18,920 KB
testcase_07 AC 15 ms
18,884 KB
testcase_08 AC 15 ms
18,772 KB
testcase_09 AC 16 ms
18,776 KB
testcase_10 AC 16 ms
18,768 KB
testcase_11 AC 16 ms
18,812 KB
testcase_12 AC 16 ms
18,880 KB
testcase_13 AC 16 ms
18,892 KB
testcase_14 AC 16 ms
18,816 KB
testcase_15 AC 15 ms
18,928 KB
testcase_16 AC 16 ms
18,880 KB
testcase_17 AC 16 ms
18,776 KB
testcase_18 AC 16 ms
18,888 KB
testcase_19 AC 16 ms
18,880 KB
testcase_20 AC 15 ms
18,836 KB
testcase_21 AC 24 ms
28,912 KB
testcase_22 AC 155 ms
37,276 KB
evil01.txt AC 154 ms
36,980 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$N=trim(fgets(STDIN));
$data= array_unique(explode(' ', trim(fgets(STDIN))));
sort($data);
$ans=PHP_INT_MAX;
for($i=0;$i<sizeof($data)-1;$i++){
    $ans=min($ans,$data[$i+1]-$data[$i]);
}
echo $ans.PHP_EOL;
0