結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
kaoetaya
|
| 提出日時 | 2016-11-08 02:09:07 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 677 bytes |
| コンパイル時間 | 3,465 ms |
| コンパイル使用メモリ | 75,144 KB |
| 実行使用メモリ | 54,316 KB |
| 最終ジャッジ日時 | 2024-11-25 04:34:58 |
| 合計ジャッジ時間 | 4,731 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 8 |
ソースコード
import java.util.Scanner;
import java.util.Arrays;
public class pre {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a,b,c,d;
String s;
int[] num = new int[10];
Arrays.fill(num,9);
for(int i=0;i<n;i++){
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
d = sc.nextInt();
s = sc.next();
if(s == "YES"){
num[a]++;
num[b]++;
num[c]++;
num[d]++;
}
else{
num[a]--;
num[b]--;
num[c]--;
num[d]--;
}
}
int max = 0;
for(int i=0;i<10;i++){
if(num[max] < num[i])
max = i;
}
System.out.println(max);
}
}
kaoetaya