結果

問題 No.857 素振り
ユーザー seaside0002seaside0002
提出日時 2019-12-22 15:26:53
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 1,023 ms
コンパイル使用メモリ 11,956 KB
実行使用メモリ 12,300 KB
最終ジャッジ日時 2023-10-12 08:29:17
合計ジャッジ時間 1,205 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,300 KB
testcase_01 AC 6 ms
12,276 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 7 ms
12,192 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($holiday1, $holiday2, $end) = explode(" ", trim(fgets(STDIN)));

suburiCheck($holiday1, $holiday2, $end);

$ans = $end;

echo $ans."\n";

function suburiCheck($h1, $h2, &$e): void{
	$hCount = 0;
	
	if ($e <= $h1)
		$hCount++;
	
	if ($e <= $h2)
		$hCount++;
	
	if ($e < $hCount){
		$e = 0;
	} else {
		$e -= $hCount;
	}
}
0