結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-03-04 17:00:10 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 113 ms / 5,000 ms | 
| コード長 | 536 bytes | 
| コンパイル時間 | 3,505 ms | 
| コンパイル使用メモリ | 74,568 KB | 
| 実行使用メモリ | 54,084 KB | 
| 最終ジャッジ日時 | 2024-07-08 02:39:54 | 
| 合計ジャッジ時間 | 5,436 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
package m.shin;
import java.util.Scanner;
public class Con24 {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int[] t = new int[10];
		int N = s.nextInt();
		for(int i = 0;i < N;i++){
			int a = s.nextInt() , b = s.nextInt() , c = s.nextInt() , d = s.nextInt() , add = -1;
			if(s.next().equals("YES")){
				add = 1;
			}
			t[a] += add;
			t[b] += add;
			t[c] += add;
			t[d] += add;
		}
		N = 0;
		for(int i = 0;i < 10;i++){
			if(t[i] >= t[N]){
				N = i;
			}
		}
		System.out.println(N);
	}
}
            
            
            
        