結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー Ruizi_LuigiRuizi_Luigi
提出日時 2015-12-20 23:29:56
言語 PHP
(8.3.4)
結果
RE  
実行時間 -
コード長 465 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 32,604 KB
実行使用メモリ 114,540 KB
最終ジャッジ日時 2023-10-17 14:38:43
合計ジャッジ時間 11,717 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 164 ms
70,080 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 44 ms
32,712 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 43 ms
32,712 KB
testcase_07 AC 43 ms
32,712 KB
testcase_08 AC 43 ms
32,712 KB
testcase_09 RE -
testcase_10 AC 54 ms
36,716 KB
testcase_11 AC 42 ms
32,712 KB
testcase_12 AC 48 ms
34,668 KB
testcase_13 AC 45 ms
32,712 KB
testcase_14 AC 47 ms
34,668 KB
testcase_15 AC 46 ms
34,668 KB
testcase_16 AC 174 ms
67,664 KB
testcase_17 AC 48 ms
34,668 KB
testcase_18 AC 55 ms
38,764 KB
testcase_19 AC 109 ms
55,148 KB
testcase_20 AC 101 ms
53,100 KB
testcase_21 AC 113 ms
55,148 KB
testcase_22 AC 45 ms
32,712 KB
testcase_23 AC 55 ms
38,764 KB
testcase_24 AC 47 ms
34,668 KB
testcase_25 AC 193 ms
72,832 KB
testcase_26 AC 43 ms
32,712 KB
testcase_27 AC 43 ms
32,712 KB
testcase_28 AC 50 ms
34,668 KB
testcase_29 AC 59 ms
38,764 KB
testcase_30 AC 389 ms
114,540 KB
testcase_31 AC 160 ms
64,544 KB
testcase_32 TLE -
testcase_33 TLE -
testcase_34 AC 99 ms
55,148 KB
testcase_35 AC 281 ms
89,964 KB
testcase_36 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$n = trim(fgets(STDIN));

list($a,$b,$c) = explode(" ", trim(fgets(STDIN)));

$list = array();
$applied = 1;
$break_flg = false;
while(!$break_flg) {
	$cnt = 0;
	if ($a * $applied <= $n) {
		$list[] = $a * $applied;
		$cnt++;
	}
	if ($b * $applied <= $n) {
		$list[] = $b * $applied;
		$cnt++;
	}
	if ($c * $applied <= $n) {
		$list[] = $c * $applied;
		$cnt++;
	}
	$applied++;
	if ($cnt === 0) $break_flg = true;
}
echo count(array_unique($list)) . "\n";
?>
0