結果
問題 |
No.24 数当てゲーム
|
ユーザー |
|
提出日時 | 2019-12-05 23:56:28 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 961 bytes |
コンパイル時間 | 3,669 ms |
コンパイル使用メモリ | 75,476 KB |
実行使用メモリ | 41,668 KB |
最終ジャッジ日時 | 2024-12-23 04:37:23 |
合計ジャッジ時間 | 5,820 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 9 |
ソースコード
import java.util.Arrays; import java.util.Scanner; public class no24 { public static void main(String[] args) { boolean[] b = new boolean[10]; Arrays.fill(b, true); Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); for (int i = 0; i < N; i++) { int[] input = {sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt()}; if (sc.next().equals("NO")) { for (int j : input) { b[j] = false; } } else { for (int j = 0; j < 10; j++) { for (int k : input) { if (j == k) { break; } } b[j] = false; } } } for (int i = 0; i < 10; i++) { if (b[i]) { System.out.println(i); } } } }