結果
問題 | No.516 赤と青の風船 |
ユーザー |
![]() |
提出日時 | 2017-07-26 17:20:55 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 2,290 ms |
コンパイル使用メモリ | 74,312 KB |
実行使用メモリ | 41,620 KB |
最終ジャッジ日時 | 2024-10-09 17:52:04 |
合計ジャッジ時間 | 4,294 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 |
ソースコード
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner s = new Scanner(System.in);String S1 = s.next();String S2 = s.next();String S3 = s.next();int num = 0;if (S1.equals("RED")){num = num+1;}if (S2.equals("RED")){num = num+1;}if (S3.equals("RED")){num = num+1;}if (num > 1){System.out.println("RED");}else{System.out.println("BLUE");}}}