結果

問題 No.182 新規性の虜
ユーザー FVRChanFVRChan
提出日時 2017-09-29 09:55:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 580 ms / 5,000 ms
コード長 660 bytes
コンパイル時間 1,727 ms
コンパイル使用メモリ 73,112 KB
実行使用メモリ 72,520 KB
最終ジャッジ日時 2023-08-27 16:37:59
合計ジャッジ時間 11,883 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,148 KB
testcase_01 AC 109 ms
56,436 KB
testcase_02 AC 110 ms
55,840 KB
testcase_03 AC 114 ms
56,048 KB
testcase_04 AC 111 ms
56,112 KB
testcase_05 AC 112 ms
55,756 KB
testcase_06 AC 110 ms
55,884 KB
testcase_07 AC 114 ms
56,128 KB
testcase_08 AC 465 ms
65,152 KB
testcase_09 AC 580 ms
67,296 KB
testcase_10 AC 555 ms
67,604 KB
testcase_11 AC 518 ms
65,248 KB
testcase_12 AC 383 ms
63,364 KB
testcase_13 AC 114 ms
55,468 KB
testcase_14 AC 121 ms
55,636 KB
testcase_15 AC 111 ms
53,388 KB
testcase_16 AC 114 ms
55,976 KB
testcase_17 AC 120 ms
55,752 KB
testcase_18 AC 470 ms
61,288 KB
testcase_19 AC 388 ms
61,256 KB
testcase_20 AC 347 ms
61,028 KB
testcase_21 AC 469 ms
61,408 KB
testcase_22 AC 358 ms
61,268 KB
testcase_23 AC 113 ms
56,096 KB
testcase_24 AC 539 ms
72,520 KB
testcase_25 AC 458 ms
60,624 KB
testcase_26 AC 260 ms
60,884 KB
testcase_27 AC 114 ms
55,788 KB
evil01.txt AC 618 ms
74,360 KB
evil02.txt AC 620 ms
73,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
public class Main{
	public static void main(String args[])throws Exception{
		Scanner sc=new Scanner(System.in);
		int n=Integer.parseInt(sc.nextLine());
		HashMap<Integer,Integer>map=new HashMap<Integer,Integer>();
		LinkedList<Integer>queue=new LinkedList<Integer>();
		for(int i=0;i<n;i++){
			int temp=sc.nextInt();
			if(!map.containsKey(temp)){
				map.put(temp,1);
				queue.offer(temp);
			}else{
				map.put(temp,map.get(temp)+1);
			}
		}int counter=0;
		for(Integer element:queue){
			if(map.get(element) == 1){
				counter++;
			}
		}System.out.println(counter);
	}
}
0