結果

問題 No.182 新規性の虜
ユーザー YukimotoPGYukimotoPG
提出日時 2019-03-01 14:05:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 607 ms / 5,000 ms
コード長 478 bytes
コンパイル時間 2,309 ms
コンパイル使用メモリ 72,788 KB
実行使用メモリ 65,756 KB
最終ジャッジ日時 2023-09-05 16:33:10
合計ジャッジ時間 12,168 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,752 KB
testcase_01 AC 118 ms
55,360 KB
testcase_02 AC 118 ms
55,600 KB
testcase_03 AC 121 ms
56,036 KB
testcase_04 AC 120 ms
55,884 KB
testcase_05 AC 122 ms
55,668 KB
testcase_06 AC 121 ms
55,892 KB
testcase_07 AC 120 ms
55,388 KB
testcase_08 AC 514 ms
63,540 KB
testcase_09 AC 607 ms
65,748 KB
testcase_10 AC 572 ms
65,756 KB
testcase_11 AC 547 ms
64,084 KB
testcase_12 AC 344 ms
60,892 KB
testcase_13 AC 119 ms
56,004 KB
testcase_14 AC 124 ms
55,700 KB
testcase_15 AC 118 ms
55,588 KB
testcase_16 AC 120 ms
56,012 KB
testcase_17 AC 126 ms
55,772 KB
testcase_18 AC 424 ms
60,708 KB
testcase_19 AC 381 ms
60,420 KB
testcase_20 AC 310 ms
61,056 KB
testcase_21 AC 436 ms
60,648 KB
testcase_22 AC 331 ms
60,680 KB
testcase_23 AC 118 ms
55,584 KB
testcase_24 AC 479 ms
64,888 KB
testcase_25 AC 383 ms
60,688 KB
testcase_26 AC 238 ms
60,196 KB
testcase_27 AC 116 ms
55,460 KB
evil01.txt AC 629 ms
66,248 KB
evil02.txt AC 573 ms
66,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int n = Integer.parseInt(sc.next());
		HashMap<Integer, Integer> map = new HashMap<>();
		for (int i=0; i<n; i++) {
			int temp = Integer.parseInt(sc.next());
			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