結果

問題 No.21 平均の差
ユーザー beatdjambeatdjam
提出日時 2016-09-23 16:37:10
言語 PHP
(8.3.4)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 1,089 ms
コンパイル使用メモリ 18,540 KB
実行使用メモリ 18,960 KB
最終ジャッジ日時 2023-08-11 05:31:33
合計ジャッジ時間 1,954 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,880 KB
testcase_01 AC 17 ms
18,892 KB
testcase_02 AC 16 ms
18,856 KB
testcase_03 AC 15 ms
18,900 KB
testcase_04 AC 15 ms
18,960 KB
testcase_05 AC 16 ms
18,860 KB
testcase_06 AC 15 ms
18,728 KB
testcase_07 AC 16 ms
18,852 KB
testcase_08 AC 15 ms
18,904 KB
testcase_09 AC 15 ms
18,840 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

	$input_lines = trim(fgets(STDIN));
	$input_lines = str_replace(array("\r\n","\r","\n"), "", $input_lines);
	do {
	    $tmpStr[] = $input_lines;
	    $input_lines = trim(fgets(STDIN));
	    $input_lines = str_replace(array("\r\n","\r","\n"), "", $input_lines);
	} while ($input_lines !== "");
	
	$max = $tmpStr[0] - 1;
	array_shift($tmpStr);
	array_shift($tmpStr);
	sort($tmpStr);
	echo $tmpStr[$max] - $tmpStr[0];
0