結果

問題 No.516 赤と青の風船
ユーザー FVRChanFVRChan
提出日時 2017-09-29 12:19:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 2,088 ms
コンパイル使用メモリ 72,420 KB
実行使用メモリ 56,192 KB
最終ジャッジ日時 2023-08-09 21:55:33
合計ジャッジ時間 3,575 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
54,280 KB
testcase_01 AC 121 ms
55,864 KB
testcase_02 AC 123 ms
56,044 KB
testcase_03 AC 120 ms
56,192 KB
testcase_04 AC 121 ms
55,400 KB
testcase_05 AC 121 ms
55,716 KB
testcase_06 AC 121 ms
56,004 KB
testcase_07 AC 118 ms
55,596 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