結果

問題 No.182 新規性の虜
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 15:01:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 666 ms / 5,000 ms
コード長 448 bytes
コンパイル時間 2,018 ms
コンパイル使用メモリ 72,508 KB
実行使用メモリ 66,760 KB
最終ジャッジ日時 2023-10-11 12:38:39
合計ジャッジ時間 13,422 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,780 KB
testcase_01 AC 121 ms
55,772 KB
testcase_02 AC 121 ms
55,500 KB
testcase_03 AC 122 ms
55,780 KB
testcase_04 AC 122 ms
55,516 KB
testcase_05 AC 126 ms
55,988 KB
testcase_06 AC 124 ms
56,080 KB
testcase_07 AC 127 ms
55,532 KB
testcase_08 AC 542 ms
62,776 KB
testcase_09 AC 666 ms
65,180 KB
testcase_10 AC 583 ms
65,108 KB
testcase_11 AC 565 ms
63,032 KB
testcase_12 AC 410 ms
60,388 KB
testcase_13 AC 123 ms
55,956 KB
testcase_14 AC 124 ms
55,784 KB
testcase_15 AC 119 ms
55,716 KB
testcase_16 AC 123 ms
56,036 KB
testcase_17 AC 125 ms
56,320 KB
testcase_18 AC 520 ms
60,260 KB
testcase_19 AC 433 ms
60,924 KB
testcase_20 AC 379 ms
60,320 KB
testcase_21 AC 536 ms
60,740 KB
testcase_22 AC 394 ms
60,272 KB
testcase_23 AC 119 ms
56,124 KB
testcase_24 AC 564 ms
66,760 KB
testcase_25 AC 464 ms
60,656 KB
testcase_26 AC 280 ms
60,676 KB
testcase_27 AC 119 ms
55,900 KB
evil01.txt AC 632 ms
68,092 KB
evil02.txt AC 656 ms
67,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int n = sc.nextInt();
		HashMap<Integer, Integer> map = new HashMap<>();
		for (int i=0; i<n; i++) {
			int temp = sc.nextInt();
			map.put(temp, map.getOrDefault(temp,0)+1);
		}
		
		int ans = 0;
		for (Map.Entry<Integer, Integer> e : map.entrySet()) {
			if (e.getValue() == 1) ans++;
		}
		System.out.println(ans);
	}
}
0