結果

問題 No.21 平均の差
ユーザー fujita_kyouheifujita_kyouhei
提出日時 2014-12-29 10:48:15
言語 PHP
(8.3.4)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 1,195 ms
コンパイル使用メモリ 18,464 KB
実行使用メモリ 18,872 KB
最終ジャッジ日時 2023-09-03 20:10:12
合計ジャッジ時間 2,107 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
18,648 KB
testcase_01 AC 14 ms
18,856 KB
testcase_02 AC 13 ms
18,872 KB
testcase_03 AC 14 ms
18,816 KB
testcase_04 AC 13 ms
18,644 KB
testcase_05 AC 14 ms
18,784 KB
testcase_06 AC 13 ms
18,864 KB
testcase_07 AC 13 ms
18,796 KB
testcase_08 AC 13 ms
18,764 KB
testcase_09 AC 13 ms
18,840 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?PHP
fscanf(STDIN,"%d",$n);
fscanf(STDIN,"%d",$k);
for ($i=0; $i < $n; $i++) 
{ 
  fscanf(STDIN,"%d",$a[$i]);
}
$max=max($a);
$min=min($a);
$ans=$max-$min;
echo "$ans\n";
?>
0