結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-09 19:11:06 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 759 ms / 5,000 ms |
| コード長 | 488 bytes |
| コンパイル時間 | 2,966 ms |
| コンパイル使用メモリ | 76,252 KB |
| 実行使用メモリ | 64,944 KB |
| 最終ジャッジ日時 | 2024-10-08 01:19:08 |
| 合計ジャッジ時間 | 14,138 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
Map<Integer,Integer> map = new HashMap<>();
int n = sc.nextInt();
for (int i=0; i<n; i++) {
int temp = sc.nextInt();
map.put(temp,map.getOrDefault(temp,0));
map.put(temp,map.get(temp)+1);
}
int num = 0;
for (Map.Entry<Integer,Integer> entry : map.entrySet()) {
if (entry.getValue()==1) {num++;}
}
System.out.println(num);
}
}
Tsukasa_Type