結果

問題 No.182 新規性の虜
ユーザー _k_a_n_i__k_a_n_i_
提出日時 2015-04-23 18:58:54
言語 Java19
(openjdk 21)
結果
AC  
実行時間 567 ms / 5,000 ms
コード長 1,026 bytes
コンパイル時間 3,343 ms
コンパイル使用メモリ 77,868 KB
実行使用メモリ 65,144 KB
最終ジャッジ日時 2023-08-27 07:15:28
合計ジャッジ時間 11,690 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
53,620 KB
testcase_01 AC 111 ms
55,660 KB
testcase_02 AC 111 ms
55,960 KB
testcase_03 AC 114 ms
55,860 KB
testcase_04 AC 114 ms
55,940 KB
testcase_05 AC 116 ms
55,656 KB
testcase_06 AC 114 ms
53,720 KB
testcase_07 AC 116 ms
56,096 KB
testcase_08 AC 479 ms
62,668 KB
testcase_09 AC 567 ms
64,888 KB
testcase_10 AC 526 ms
64,680 KB
testcase_11 AC 518 ms
62,492 KB
testcase_12 AC 375 ms
60,868 KB
testcase_13 AC 108 ms
55,972 KB
testcase_14 AC 113 ms
55,720 KB
testcase_15 AC 106 ms
55,516 KB
testcase_16 AC 114 ms
55,852 KB
testcase_17 AC 114 ms
55,588 KB
testcase_18 AC 467 ms
60,784 KB
testcase_19 AC 396 ms
60,352 KB
testcase_20 AC 351 ms
60,244 KB
testcase_21 AC 460 ms
60,400 KB
testcase_22 AC 358 ms
60,584 KB
testcase_23 AC 110 ms
55,716 KB
testcase_24 AC 495 ms
65,144 KB
testcase_25 AC 409 ms
60,444 KB
testcase_26 AC 261 ms
60,256 KB
testcase_27 AC 113 ms
56,020 KB
evil01.txt AC 585 ms
66,696 KB
evil02.txt AC 579 ms
65,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main
{
    private final static Main main = new Main();

    public static void main(String[] args)
    {
        long l = System.currentTimeMillis();
        main.solve();
        //System.out.println("処理時間:" + (System.currentTimeMillis() - l));
    }

    private void solve()
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for(int i=0; i<n; ++i)
        {
            int in = sc.nextInt();
            if(map.containsKey(in))
            {
                map.put(in, map.get(in)+1);
            }
            else
            {
                map.put(in, 1);
            }
        }
        int ans = 0;
        for(Map.Entry<Integer, Integer> e : map.entrySet())
        {
            if(e.getValue() == 1)
            {
                ++ans;
            }
        }
        System.out.println(ans);
    }
}
0