結果

問題 No.182 新規性の虜
ユーザー yun_appyun_app
提出日時 2016-05-12 12:53:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 307 ms / 5,000 ms
コード長 950 bytes
コンパイル時間 2,823 ms
コンパイル使用メモリ 72,388 KB
実行使用メモリ 65,712 KB
最終ジャッジ日時 2023-08-27 11:17:51
合計ジャッジ時間 7,792 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,504 KB
testcase_01 AC 43 ms
49,340 KB
testcase_02 AC 45 ms
49,504 KB
testcase_03 AC 41 ms
49,236 KB
testcase_04 AC 42 ms
49,288 KB
testcase_05 AC 43 ms
49,308 KB
testcase_06 AC 41 ms
49,284 KB
testcase_07 AC 42 ms
49,240 KB
testcase_08 AC 233 ms
60,812 KB
testcase_09 AC 307 ms
65,712 KB
testcase_10 AC 278 ms
62,256 KB
testcase_11 AC 251 ms
62,368 KB
testcase_12 AC 168 ms
55,912 KB
testcase_13 AC 42 ms
49,440 KB
testcase_14 AC 42 ms
49,076 KB
testcase_15 AC 43 ms
49,244 KB
testcase_16 AC 43 ms
49,724 KB
testcase_17 AC 43 ms
49,176 KB
testcase_18 AC 204 ms
60,576 KB
testcase_19 AC 176 ms
57,936 KB
testcase_20 AC 136 ms
54,652 KB
testcase_21 AC 216 ms
60,028 KB
testcase_22 AC 158 ms
58,032 KB
testcase_23 AC 42 ms
49,368 KB
testcase_24 AC 268 ms
65,624 KB
testcase_25 AC 160 ms
58,484 KB
testcase_26 AC 117 ms
54,552 KB
testcase_27 AC 41 ms
49,324 KB
evil01.txt AC 315 ms
66,752 KB
evil02.txt AC 313 ms
67,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        String[] lines = br.readLine().split(" ");
        HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
        for(String st:lines){
            int num = Integer.parseInt(st);
            if(map.containsKey(num)){
                map.put(num,2);
            }else{
                map.put(num,1);
            }
        }
        int ans = 0;
        for(int m:map.keySet()){
            if(map.get(m)==1){
                ++ans;
            }
        }
        System.out.println(ans);
    }
}
0