結果

問題 No.182 新規性の虜
ユーザー spaciaspacia
提出日時 2015-12-20 12:51:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 248 ms / 5,000 ms
コード長 715 bytes
コンパイル時間 2,572 ms
コンパイル使用メモリ 72,376 KB
実行使用メモリ 63,068 KB
最終ジャッジ日時 2023-08-27 07:40:02
合計ジャッジ時間 7,334 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,252 KB
testcase_01 AC 42 ms
49,176 KB
testcase_02 AC 42 ms
49,248 KB
testcase_03 AC 42 ms
49,340 KB
testcase_04 AC 40 ms
49,312 KB
testcase_05 AC 42 ms
49,504 KB
testcase_06 AC 42 ms
49,252 KB
testcase_07 AC 43 ms
49,348 KB
testcase_08 AC 198 ms
60,832 KB
testcase_09 AC 248 ms
63,068 KB
testcase_10 AC 220 ms
62,764 KB
testcase_11 AC 196 ms
60,616 KB
testcase_12 AC 134 ms
56,640 KB
testcase_13 AC 42 ms
49,348 KB
testcase_14 AC 42 ms
49,264 KB
testcase_15 AC 41 ms
49,252 KB
testcase_16 AC 43 ms
49,620 KB
testcase_17 AC 43 ms
49,444 KB
testcase_18 AC 188 ms
55,924 KB
testcase_19 AC 166 ms
58,104 KB
testcase_20 AC 124 ms
54,232 KB
testcase_21 AC 191 ms
60,412 KB
testcase_22 AC 139 ms
57,236 KB
testcase_23 AC 43 ms
49,192 KB
testcase_24 AC 224 ms
62,108 KB
testcase_25 AC 185 ms
61,120 KB
testcase_26 AC 99 ms
52,160 KB
testcase_27 AC 41 ms
49,172 KB
evil01.txt AC 285 ms
67,108 KB
evil02.txt AC 274 ms
66,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main182 {
	
	public static void out (Object out) {
		System.out.println(out);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int ans = 0;
		int n = Integer.parseInt(br.readLine());
		String[] line = br.readLine().split(" ");
		HashMap<String, Integer> map = new HashMap<String, Integer>();
		
		for (int i = 0; i < n; i++) {
			if (map.containsKey(line[i])) {
				map.put(line[i], map.get(line[i]) + 1);
			} else {
				map.put(line[i], 1);
			}
		}
		for (String key : map.keySet()) {
			if (map.get(key) == 1) ans++;
		}
		
		out(ans);
		
	}
}
0