結果

問題 No.516 赤と青の風船
ユーザー YamaKasaYamaKasa
提出日時 2018-05-06 18:14:00
言語 Java19
(openjdk 21)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 2,360 ms
コンパイル使用メモリ 72,284 KB
実行使用メモリ 56,028 KB
最終ジャッジ日時 2023-09-10 10:47:24
合計ジャッジ時間 3,924 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,028 KB
testcase_01 AC 118 ms
55,960 KB
testcase_02 AC 118 ms
55,688 KB
testcase_03 AC 118 ms
55,820 KB
testcase_04 AC 117 ms
55,388 KB
testcase_05 AC 117 ms
55,632 KB
testcase_06 AC 117 ms
55,588 KB
testcase_07 AC 117 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String []S = new String[3];
		for(int i = 0; i < 3; i++) {
			S[i] = scan.next();
		}
		scan.close();
		int cnt1 = 0;
		for(int i = 0; i < 3; i++) {
			if(S[i].equals("BLUE")) {
				cnt1 ++;
			}
		}
		if(cnt1 > 1) {
			System.out.println("BLUE");
		}else {
			System.out.println("RED");
		}
	}
}
0