結果
問題 | No.516 赤と青の風船 |
ユーザー | sirao |
提出日時 | 2017-07-12 18:36:46 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 825 bytes |
コンパイル時間 | 2,125 ms |
コンパイル使用メモリ | 74,800 KB |
実行使用メモリ | 54,332 KB |
最終ジャッジ日時 | 2024-04-16 17:51:49 |
合計ジャッジ時間 | 3,797 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 131 ms
41,540 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 128 ms
41,748 KB |
testcase_05 | WA | - |
testcase_06 | AC | 130 ms
41,572 KB |
testcase_07 | AC | 129 ms
41,388 KB |
ソースコード
import java.util.Scanner; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { int a1 = 1; int b1 = 1; int c1 = 1; String ans = "0"; Scanner s = new Scanner(System.in); String a = s.next(); String b = s.next(); String c = s.next(); if (a == "BLUE"){ a1 = -1; } if (b == "BLUE"){ b1 = -1; } if (c == "BLUE"){ c1 = -1; } if (a1+b1+c1<0){ ans = "BLUE"; }else{ ans = "RED"; } System.out.println(ans); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); } }