結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-22 23:10:17 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 57 ms / 5,000 ms |
| + 436µs | |
| コード長 | 765 bytes |
| 記録 | |
| コンパイル時間 | 2,334 ms |
| コンパイル使用メモリ | 85,384 KB |
| 実行使用メモリ | 45,116 KB |
| 最終ジャッジ日時 | 2026-10-11 01:27:12 |
| 合計ジャッジ時間 | 4,144 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder24 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] abcd = new int[10];
int y = 0;
for (int i = 0; i < n; i++) {
int[] tmp = new int[4];
for (int j = 0; j < 4; j++) {
tmp[j] = sc.nextInt();
}
int d;
if (sc.next().equals("YES")) {
d = 1;
y++;
} else {
d = -1;
}
for (int j = 0; j < 4; j++) {
abcd[tmp[j]] += d;
}
}
for (int i = 0; i < 10; i++) {
if (y == abcd[i]) {
System.out.println(i);
}
}
sc.close();
}
}