結果

問題 No.516 赤と青の風船
ユーザー すーみんすーみん
提出日時 2018-05-24 12:45:15
言語 PHP
(8.3.4)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 18,432 KB
実行使用メモリ 18,916 KB
最終ジャッジ日時 2023-09-11 02:13:32
合計ジャッジ時間 1,082 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,884 KB
testcase_01 AC 16 ms
18,872 KB
testcase_02 AC 16 ms
18,848 KB
testcase_03 AC 16 ms
18,884 KB
testcase_04 AC 17 ms
18,792 KB
testcase_05 AC 16 ms
18,792 KB
testcase_06 AC 16 ms
18,704 KB
testcase_07 AC 16 ms
18,916 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$red = $blue = 0;
for($i=0;$i<3;$i++){
    switch(trim(fgets(STDIN))){
        case 'RED':
            $red++;
            break;
        case 'BLUE':
            $blue++;
            break;
    }
}
if($blue>$red) echo 'BLUE'."\n";
elseif ($blue<$red) echo 'RED'."\n"; 
0