結果

問題 No.516 赤と青の風船
ユーザー FVRChanFVRChan
提出日時 2017-09-29 12:19:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 2,211 ms
コンパイル使用メモリ 74,300 KB
実行使用メモリ 41,392 KB
最終ジャッジ日時 2024-04-27 16:17:21
合計ジャッジ時間 3,158 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
40,064 KB
testcase_01 AC 111 ms
40,992 KB
testcase_02 AC 95 ms
40,060 KB
testcase_03 AC 95 ms
40,184 KB
testcase_04 AC 100 ms
40,064 KB
testcase_05 AC 115 ms
41,092 KB
testcase_06 AC 108 ms
41,392 KB
testcase_07 AC 103 ms
40,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		int r=0,b=0;
		for(int i=0;i<3;i++){
			if(sc.nextLine().equals("RED"))r++;
			else b++;
		}
		if(r<b)System.out.println("BLUE");
		else System.out.println("RED");
	}
}
0