結果
問題 |
No.516 赤と青の風船
|
ユーザー |
![]() |
提出日時 | 2017-07-18 15:35:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 109 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 2,934 ms |
コンパイル使用メモリ | 74,320 KB |
実行使用メモリ | 41,180 KB |
最終ジャッジ日時 | 2024-10-08 10:51:52 |
合計ジャッジ時間 | 4,288 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 |
ソースコード
import java.util.Scanner; public class N516 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String [] S=new String[3]; int red=0; int blue=0; String msg=""; for(int i=0;i<3;i++) { S[i]=sc.next(); if(S[i].equals("RED")) {red++;} else if(S[i].equals("BLUE")) {blue++;} } if(red>blue) {msg="RED";} else {msg="BLUE";} System.out.println(msg); } }