結果

問題 No.516 赤と青の風船
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-05 00:57:51
言語 Java19
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 2,674 ms
コンパイル使用メモリ 72,568 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-09-10 10:03:52
合計ジャッジ時間 4,412 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,724 KB
testcase_01 AC 117 ms
55,540 KB
testcase_02 AC 118 ms
56,084 KB
testcase_03 AC 119 ms
55,952 KB
testcase_04 AC 117 ms
55,616 KB
testcase_05 AC 118 ms
55,908 KB
testcase_06 AC 116 ms
55,616 KB
testcase_07 AC 118 ms
55,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        int r = 0, b = 0;

        Scanner in = new Scanner(System.in);
        String s1 = in.next();
        if(s1.equals("RED")) r++;
        else b++;

        String s2 = in.next();
        if(s2.equals("RED")) r++;
        else b++;

        String s3 = in.next();
        if(s3.equals("RED")) r++;
        else b++;

        if(r > b) System.out.println("RED");
        else System.out.println("BLUE");
    }
}
0