結果
問題 | No.516 赤と青の風船 |
ユーザー | Pccla |
提出日時 | 2017-07-12 21:29:18 |
言語 | PHP (8.3.4) |
結果 |
RE
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 31,076 KB |
実行使用メモリ | 31,472 KB |
最終ジャッジ日時 | 2024-04-16 17:52:31 |
合計ジャッジ時間 | 1,036 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php fscanf(STDIN, "%d %d %d", $s1, $s2, $s3); $balloon_arr = array($s1, $s2, $s3); foreach ($balloon_arr as $balloon) { if ($balloon === "RED") { $count = "red"; } elseif ($balloon === "BLUE") { $count = "blue"; } $color_count = array($count); $red_count = mb_substr_count($color_count, "red"); $blue_count = mb_substr_count($color_count, "blue"); if ($red_count > 1) { echo "RED"; } elseif ($blue_count > 1) { echo "BLUE"; } }