結果

問題 No.516 赤と青の風船
ユーザー shinwisteriashinwisteria
提出日時 2018-02-16 22:56:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 427 bytes
コンパイル時間 3,874 ms
コンパイル使用メモリ 72,804 KB
実行使用メモリ 56,028 KB
最終ジャッジ日時 2023-09-05 08:27:14
合計ジャッジ時間 5,886 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,520 KB
testcase_01 AC 125 ms
55,956 KB
testcase_02 AC 126 ms
55,512 KB
testcase_03 AC 123 ms
55,924 KB
testcase_04 AC 125 ms
55,532 KB
testcase_05 AC 131 ms
55,760 KB
testcase_06 AC 127 ms
55,512 KB
testcase_07 AC 128 ms
56,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con516 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		int r = 0,b = 0;
		for(int i = 0;i < 3;i++){
			if(s.nextLine().equals("RED")){
				r++;
			}else{
				b++;
			}
		}
		s.close();
		if(r > b){
			System.out.println("RED");
		}else{
			System.out.println("BLUE");
		}

	}

}
0