結果

問題 No.516 赤と青の風船
ユーザー Amanita2016Amanita2016
提出日時 2017-06-30 17:42:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 448 bytes
コンパイル時間 2,055 ms
コンパイル使用メモリ 74,192 KB
実行使用メモリ 54,140 KB
最終ジャッジ日時 2024-04-15 05:50:00
合計ジャッジ時間 3,806 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
54,140 KB
testcase_01 AC 115 ms
53,820 KB
testcase_02 AC 101 ms
52,596 KB
testcase_03 AC 112 ms
53,824 KB
testcase_04 AC 103 ms
52,980 KB
testcase_05 AC 112 ms
54,092 KB
testcase_06 AC 102 ms
53,120 KB
testcase_07 AC 114 ms
53,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int cntRed = 0 , cntBlue = 0;
		String disp ;
		for(int i = 0 ; i < 3 ; i++){
			if(sc.nextLine().equals("RED")){
				cntRed++;
			}else{
				cntBlue++;
			}
		}
		if(cntRed > cntBlue){
			disp = "RED";
		}else{
			disp = "BLUE";
		}
	    System.out.println(disp);
	}

}
0