結果

問題 No.516 赤と青の風船
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 17:00:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 2,899 ms
コンパイル使用メモリ 71,828 KB
実行使用メモリ 56,404 KB
最終ジャッジ日時 2023-10-11 11:42:34
合計ジャッジ時間 3,783 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,780 KB
testcase_01 AC 115 ms
56,036 KB
testcase_02 AC 117 ms
55,424 KB
testcase_03 AC 116 ms
56,404 KB
testcase_04 AC 116 ms
55,752 KB
testcase_05 AC 116 ms
56,240 KB
testcase_06 AC 117 ms
55,572 KB
testcase_07 AC 119 ms
55,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int red = 0;
		int blue = 0;
		for (int i=0; i<3; i++) {
			if (sc.next().equals("RED")) red++;
			else blue++;
		}
		System.out.println(red>blue?"RED":"BLUE");
		
	}
}
0