結果
| 問題 | No.516 赤と青の風船 |
| コンテスト | |
| ユーザー |
Pccla
|
| 提出日時 | 2017-07-12 21:29:18 |
| 言語 | PHP (843.2) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 463 bytes |
| 記録 | |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 32,276 KB |
| 実行使用メモリ | 32,656 KB |
| 最終ジャッジ日時 | 2024-10-07 16:47:28 |
| 合計ジャッジ時間 | 1,164 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 6 |
コンパイルメッセージ
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";
}
}
Pccla