結果

問題 No.182 新規性の虜
ユーザー ffmm00ffmm00
提出日時 2015-06-04 03:35:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 691 ms / 5,000 ms
コード長 610 bytes
コンパイル時間 5,329 ms
コンパイル使用メモリ 74,292 KB
実行使用メモリ 66,928 KB
最終ジャッジ日時 2023-08-27 07:19:29
合計ジャッジ時間 16,214 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,980 KB
testcase_01 AC 128 ms
55,920 KB
testcase_02 AC 128 ms
55,880 KB
testcase_03 AC 129 ms
55,828 KB
testcase_04 AC 129 ms
55,508 KB
testcase_05 AC 132 ms
56,056 KB
testcase_06 AC 130 ms
55,672 KB
testcase_07 AC 131 ms
55,840 KB
testcase_08 AC 548 ms
62,864 KB
testcase_09 AC 691 ms
65,284 KB
testcase_10 AC 616 ms
65,084 KB
testcase_11 AC 609 ms
65,508 KB
testcase_12 AC 416 ms
60,840 KB
testcase_13 AC 127 ms
55,920 KB
testcase_14 AC 132 ms
55,940 KB
testcase_15 AC 127 ms
55,964 KB
testcase_16 AC 130 ms
55,764 KB
testcase_17 AC 134 ms
55,704 KB
testcase_18 AC 553 ms
60,500 KB
testcase_19 AC 467 ms
60,264 KB
testcase_20 AC 399 ms
62,152 KB
testcase_21 AC 565 ms
60,380 KB
testcase_22 AC 414 ms
60,036 KB
testcase_23 AC 127 ms
55,932 KB
testcase_24 AC 594 ms
66,928 KB
testcase_25 AC 496 ms
58,516 KB
testcase_26 AC 302 ms
59,980 KB
testcase_27 AC 128 ms
55,696 KB
evil01.txt AC 683 ms
67,304 KB
evil02.txt AC 704 ms
67,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class N182 {

	public static void main(String[] args) {
		Scanner sca = new Scanner(System.in);
		Map<Integer, Integer> vt = new HashMap<Integer, Integer>();

		int n = sca.nextInt();
		int[] a = new int[n];

		for (int i = 0; i < n; i++) {
			a[i] = sca.nextInt();
			if (vt.containsKey(a[i]))
				vt.put(a[i], vt.get(a[i]) + 1);
			else
				vt.put(a[i], 1);
		}

		int C = 0;

		for (Map.Entry<Integer, Integer> voter : vt.entrySet()) {
			int S = voter.getValue();
			if (S == 1)
				C++;
		}

		System.out.println(C);

	}

}
0