結果

問題 No.24 数当てゲーム
ユーザー m2543315647m2543315647
提出日時 2015-05-13 10:26:06
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 633 bytes
コンパイル時間 3,217 ms
コンパイル使用メモリ 71,524 KB
実行使用メモリ 57,668 KB
最終ジャッジ日時 2023-09-20 05:02:37
合計ジャッジ時間 5,244 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class No24 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final int n = sc.nextInt();
		int a, b, c, d;
		boolean r[] = new boolean[10];
		Arrays.fill(r, true);
		for (int i = 0; i < n; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			d = sc.nextInt();
			if (args[(i + 1) * 5].length() == 3) {
				for (int j = 0; j < 10; j++)
					if (j != a && j != b && j != c && j != d)
						r[j] = false;
			} else {
				r[a] = r[b] = r[c] = r[d] = false;
			}
		}
		for(int i=0;i<10;i++)if(r[i])System.out.println(i);
	}
}
0