結果
| 問題 | No.516 赤と青の風船 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-21 15:36:07 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 2,323 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 46,720 KB |
| 最終ジャッジ日時 | 2026-04-08 00:47:52 |
| 合計ジャッジ時間 | 3,017 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = "";
int countR = 0;
int countB = 0;
for ( int i = 0; i < 3; i++ ){
s = sc.next();
if ( s.equals("RED")) countR++;
else if ( s.equals("BLUE")) countB++;
}
if( countB > countR) System.out.println("BLUE");
else System.out.println("RED");
sc.close();
}
}