結果

問題 No.182 新規性の虜
ユーザー tentententen
提出日時 2020-10-09 13:08:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 560 ms / 5,000 ms
コード長 625 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 73,424 KB
実行使用メモリ 64,964 KB
最終ジャッジ日時 2023-09-27 12:37:07
合計ジャッジ時間 11,856 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
55,636 KB
testcase_01 AC 108 ms
56,048 KB
testcase_02 AC 104 ms
53,924 KB
testcase_03 AC 109 ms
55,916 KB
testcase_04 AC 106 ms
55,744 KB
testcase_05 AC 110 ms
56,064 KB
testcase_06 AC 105 ms
55,664 KB
testcase_07 AC 113 ms
56,020 KB
testcase_08 AC 448 ms
62,712 KB
testcase_09 AC 560 ms
64,728 KB
testcase_10 AC 502 ms
64,896 KB
testcase_11 AC 524 ms
63,364 KB
testcase_12 AC 358 ms
60,624 KB
testcase_13 AC 108 ms
55,600 KB
testcase_14 AC 110 ms
56,432 KB
testcase_15 AC 105 ms
56,068 KB
testcase_16 AC 106 ms
55,548 KB
testcase_17 AC 106 ms
56,072 KB
testcase_18 AC 481 ms
60,612 KB
testcase_19 AC 365 ms
60,868 KB
testcase_20 AC 307 ms
60,452 KB
testcase_21 AC 435 ms
60,216 KB
testcase_22 AC 338 ms
60,084 KB
testcase_23 AC 131 ms
55,544 KB
testcase_24 AC 480 ms
64,964 KB
testcase_25 AC 420 ms
60,380 KB
testcase_26 AC 256 ms
59,808 KB
testcase_27 AC 108 ms
56,004 KB
evil01.txt AC 556 ms
67,828 KB
evil02.txt AC 549 ms
67,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n; i++) {
            int x = sc.nextInt();
            if (map.containsKey(x)) {
                map.put(x, map.get(x) + 1);
            } else {
                map.put(x, 1);
            }
        }
        int count = 0;
        for (int x : map.values()) {
            if (x == 1) {
                count++;
            }
        }
        System.out.println(count);
    }
}
0