結果

問題 No.516 赤と青の風船
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-12 08:04:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 2,237 ms
コンパイル使用メモリ 74,404 KB
実行使用メモリ 53,944 KB
最終ジャッジ日時 2024-04-28 16:55:57
合計ジャッジ時間 3,634 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
53,008 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 125 ms
53,588 KB
testcase_05 WA -
testcase_06 AC 125 ms
53,792 KB
testcase_07 AC 124 ms
53,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		String s3 = sc.next();
		int n = 0;
		if(s1.equals("RED")) {
			n++;
		}
		if(s2.equals("RED")) {
			n++;
		}
		if(s3.equals("RED")) {
			n++;
		}
		if(n >= 2) {
			System.out.println("RED");
		} else {
			System.out.println("BRUE");
		}
	}
}
0