結果

問題 No.21 平均の差
ユーザー sorchsorch
提出日時 2021-01-01 09:39:08
言語 PHP
(8.3.4)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 30,744 KB
実行使用メモリ 31,368 KB
最終ジャッジ日時 2024-04-19 04:13:57
合計ジャッジ時間 1,587 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
31,096 KB
testcase_01 AC 41 ms
31,100 KB
testcase_02 AC 41 ms
31,012 KB
testcase_03 AC 41 ms
30,904 KB
testcase_04 AC 40 ms
30,960 KB
testcase_05 AC 39 ms
31,132 KB
testcase_06 AC 40 ms
31,096 KB
testcase_07 AC 40 ms
31,188 KB
testcase_08 AC 41 ms
31,368 KB
testcase_09 AC 41 ms
30,984 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

/**
 * @see https://yukicoder.me/problems/no/21
 */

$N = trim(fgets(STDIN));
$K = trim(fgets(STDIN));
$n = [];

for ($i = 0; $i < $N; $i++) {
    $n[] = trim(fgets(STDIN));
}

$max = max($n);
$min = min($n);

echo $max - $min . "\n";
0