結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー 綾地寧々綾地寧々
提出日時 2015-05-22 23:52:12
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 1,165 ms
コンパイル使用メモリ 18,600 KB
実行使用メモリ 25,120 KB
最終ジャッジ日時 2023-09-20 10:09:10
合計ジャッジ時間 2,981 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,820 KB
testcase_01 WA -
testcase_02 AC 14 ms
18,900 KB
testcase_03 AC 14 ms
18,892 KB
testcase_04 AC 15 ms
18,996 KB
testcase_05 AC 19 ms
24,936 KB
testcase_06 AC 14 ms
18,932 KB
testcase_07 AC 14 ms
18,936 KB
testcase_08 AC 15 ms
18,972 KB
testcase_09 AC 15 ms
18,908 KB
testcase_10 AC 15 ms
18,936 KB
testcase_11 AC 15 ms
18,796 KB
testcase_12 AC 15 ms
18,984 KB
testcase_13 AC 14 ms
18,988 KB
testcase_14 AC 16 ms
20,868 KB
testcase_15 AC 15 ms
18,864 KB
testcase_16 AC 18 ms
24,964 KB
testcase_17 WA -
testcase_18 AC 18 ms
24,964 KB
testcase_19 AC 17 ms
20,924 KB
testcase_20 AC 19 ms
24,932 KB
testcase_21 AC 15 ms
19,024 KB
testcase_22 WA -
testcase_23 AC 19 ms
24,844 KB
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$users = trim(fgets(STDIN));
$points = explode(" ",trim(fgets(STDIN)));
$p_count = array_count_values($points);
$max = 0;
$max_index = 0;
foreach ( $p_count as $index => $p ) {
	if ( $p >= $max ) {
		$max = $p;
		if ( $index >= $max_index ) {
			$max_index = $index;
		}
	}
}
echo $max_index.PHP_EOL;
0