結果

問題 No.182 新規性の虜
ユーザー kou6839kou6839
提出日時 2015-04-16 23:36:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 700 ms / 5,000 ms
コード長 514 bytes
コンパイル時間 2,203 ms
コンパイル使用メモリ 73,488 KB
実行使用メモリ 65,140 KB
最終ジャッジ日時 2023-08-27 07:07:01
合計ジャッジ時間 13,924 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,768 KB
testcase_01 AC 125 ms
55,840 KB
testcase_02 AC 125 ms
55,952 KB
testcase_03 AC 129 ms
55,944 KB
testcase_04 AC 128 ms
55,632 KB
testcase_05 AC 130 ms
56,100 KB
testcase_06 AC 129 ms
55,536 KB
testcase_07 AC 131 ms
55,596 KB
testcase_08 AC 550 ms
63,184 KB
testcase_09 AC 700 ms
64,880 KB
testcase_10 AC 639 ms
64,600 KB
testcase_11 AC 626 ms
62,684 KB
testcase_12 AC 424 ms
61,468 KB
testcase_13 AC 128 ms
56,000 KB
testcase_14 AC 131 ms
53,740 KB
testcase_15 AC 126 ms
56,232 KB
testcase_16 AC 129 ms
56,080 KB
testcase_17 AC 135 ms
55,736 KB
testcase_18 AC 545 ms
60,312 KB
testcase_19 AC 480 ms
60,340 KB
testcase_20 AC 392 ms
60,436 KB
testcase_21 AC 579 ms
60,676 KB
testcase_22 AC 433 ms
60,088 KB
testcase_23 AC 127 ms
55,712 KB
testcase_24 AC 595 ms
65,140 KB
testcase_25 AC 489 ms
60,292 KB
testcase_26 AC 301 ms
59,948 KB
testcase_27 AC 128 ms
55,452 KB
evil01.txt AC 686 ms
67,264 KB
evil02.txt AC 703 ms
67,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;


public class Main {
	public static void main(String[] args){
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		HashMap<Integer, Integer> map = new HashMap<>();
		for(int i=0;i<n;i++){
			int a = sc.nextInt();
			if(!map.containsKey(a)){
				map.put(a, 1);
			}else{
				map.put(a, map.get(a)+1);
			}
		}
		int ans=0;
		for (Integer  v : map.keySet()) {
			if(map.get(v)==1) ans++;
			
		}
		System.out.println(ans);
	}
}
0