結果

問題 No.24 数当てゲーム
ユーザー m2543315647m2543315647
提出日時 2015-05-13 10:22:40
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 693 bytes
コンパイル時間 4,149 ms
コンパイル使用メモリ 73,500 KB
実行使用メモリ 56,392 KB
最終ジャッジ日時 2023-09-20 05:02:30
合計ジャッジ時間 6,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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;
			}
		if(Arrays.asList(r).lastIndexOf(true)==Arrays.asList(r).indexOf(true)){
			System.out.println(i);
			return;
			}
		}
	}
}
0