結果

問題 No.516 赤と青の風船
ユーザー jimanojimano
提出日時 2018-01-25 12:53:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 3,058 ms
コンパイル使用メモリ 71,364 KB
実行使用メモリ 49,520 KB
最終ジャッジ日時 2023-08-27 05:49:59
合計ジャッジ時間 4,088 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,324 KB
testcase_01 AC 42 ms
47,204 KB
testcase_02 AC 42 ms
49,264 KB
testcase_03 AC 42 ms
49,520 KB
testcase_04 AC 43 ms
49,428 KB
testcase_05 AC 42 ms
49,276 KB
testcase_06 AC 43 ms
49,264 KB
testcase_07 AC 43 ms
49,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0516 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String[] input = new String[3];
			int cntRed = 0;
			int cntBlue = 0;
			for (int i = 0; i < input.length; i++) {
				input[i] = br.readLine();
				if (input[i].equals("BLUE")) {
					cntBlue++;
				} else {
					cntRed++;
				}
			}
			System.out.println(cntRed < cntBlue ? "BLUE" : "RED");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0