結果

問題 No.24 数当てゲーム
ユーザー mustonmuston
提出日時 2016-05-12 13:25:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 735 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 77,148 KB
実行使用メモリ 41,700 KB
最終ジャッジ日時 2024-04-15 15:17:58
合計ジャッジ時間 4,144 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,332 KB
testcase_01 AC 134 ms
41,376 KB
testcase_02 AC 136 ms
41,364 KB
testcase_03 AC 137 ms
41,640 KB
testcase_04 AC 135 ms
41,248 KB
testcase_05 AC 134 ms
41,700 KB
testcase_06 AC 134 ms
41,408 KB
testcase_07 AC 138 ms
41,376 KB
testcase_08 AC 133 ms
41,644 KB
testcase_09 AC 138 ms
41,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
class Aaf {
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int [] qst = {0,0,0,0,0,0,0,0,0,0};
    for(int i=0; i<N; i++){
      int A = scan.nextInt();
      int B = scan.nextInt();
      int C = scan.nextInt();
      int D = scan.nextInt();
      String R = scan.next();
      if(R.equals("YES")){
        for(int j=0;j<qst.length;j++){
          if(j!=A&&j!=B&&j!=C&&j!=D){
            qst[j]=1;
          }
        }
      }else{
        qst[A]=1;
        qst[B]=1;
        qst[C]=1;
        qst[D]=1;
      }
    }
    for(int k=0;k<qst.length;k++){
      if(qst[k]==0){
        System.out.println(k);
      }
    }
  }
}
0