結果

問題 No.516 赤と青の風船
ユーザー FVRChan
提出日時 2017-09-29 12:19:21
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 2,421 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 54,064 KB
最終ジャッジ日時 2024-11-15 19:51:56
合計ジャッジ時間 4,232 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

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