結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2019-07-13 13:31:04 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 139 ms / 5,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 23 ms |
コンパイル使用メモリ | 6,692 KB |
実行使用メモリ | 58,232 KB |
最終ジャッジ日時 | 2024-10-13 01:12:38 |
合計ジャッジ時間 | 3,415 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const N = Number(lines.next().value); const A = lines.next().value.split(' '); const count = new Map(); A.forEach(x => { if (!count.has(x)) { count.set(x, 0); } count.set(x, count.get(x) + 1); }); console.log([...count.values()].reduce((a, x) => a + Number(x === 1), 0));