結果
問題 | No.516 赤と青の風船 |
ユーザー | fjafjafja |
提出日時 | 2017-07-18 15:35:56 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 143 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 3,582 ms |
コンパイル使用メモリ | 74,896 KB |
実行使用メモリ | 41,232 KB |
最終ジャッジ日時 | 2024-04-17 01:56:19 |
合計ジャッジ時間 | 5,311 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 140 ms
41,232 KB |
testcase_01 | AC | 136 ms
41,056 KB |
testcase_02 | AC | 138 ms
40,984 KB |
testcase_03 | AC | 143 ms
40,980 KB |
testcase_04 | AC | 140 ms
41,152 KB |
testcase_05 | AC | 138 ms
41,112 KB |
testcase_06 | AC | 142 ms
41,016 KB |
testcase_07 | AC | 137 ms
41,188 KB |
ソースコード
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); } }