結果

問題 No.516 赤と青の風船
ユーザー Mcpu3Mcpu3
提出日時 2018-04-14 20:41:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 2,097 ms
コンパイル使用メモリ 71,992 KB
実行使用メモリ 56,300 KB
最終ジャッジ日時 2023-09-09 05:27:45
合計ジャッジ時間 3,651 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,672 KB
testcase_01 AC 118 ms
56,300 KB
testcase_02 AC 115 ms
54,032 KB
testcase_03 AC 117 ms
55,624 KB
testcase_04 AC 114 ms
55,688 KB
testcase_05 AC 113 ms
55,412 KB
testcase_06 AC 113 ms
55,564 KB
testcase_07 AC 115 ms
55,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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