結果

問題 No.191 供託金
ユーザー po1415po1415
提出日時 2015-05-27 00:38:38
言語 PHP
(8.3.4)
結果
AC  
実行時間 47 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 32,272 KB
実行使用メモリ 31,468 KB
最終ジャッジ日時 2024-04-28 07:12:42
合計ジャッジ時間 2,137 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
30,936 KB
testcase_01 AC 47 ms
31,132 KB
testcase_02 AC 47 ms
31,288 KB
testcase_03 AC 42 ms
30,984 KB
testcase_04 AC 41 ms
31,264 KB
testcase_05 AC 41 ms
31,100 KB
testcase_06 AC 38 ms
31,244 KB
testcase_07 AC 39 ms
31,112 KB
testcase_08 AC 40 ms
31,408 KB
testcase_09 AC 41 ms
31,156 KB
testcase_10 AC 41 ms
31,048 KB
testcase_11 AC 41 ms
30,844 KB
testcase_12 AC 39 ms
31,144 KB
testcase_13 AC 40 ms
31,460 KB
testcase_14 AC 41 ms
31,068 KB
testcase_15 AC 40 ms
31,148 KB
testcase_16 AC 40 ms
31,084 KB
testcase_17 AC 41 ms
31,468 KB
testcase_18 AC 41 ms
31,348 KB
testcase_19 AC 41 ms
31,364 KB
testcase_20 AC 40 ms
31,216 KB
testcase_21 AC 41 ms
31,312 KB
testcase_22 AC 41 ms
31,344 KB
testcase_23 AC 41 ms
31,168 KB
testcase_24 AC 41 ms
31,056 KB
testcase_25 AC 43 ms
31,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN, '%d', $candidateNum);

$fmt = '%s';
for ($i = 1; $i < $candidateNum; $i++) {
	$fmt .= ' %s';
}

$votes = fscanf(STDIN, $fmt);
$border = array_sum($votes) / 10;

$ans = 0;
foreach ($votes as $vote) {
	if ($vote <= $border) {
		$ans += 30;
	}
}

echo $ans;

?>
0