結果

問題 No.182 新規性の虜
ユーザー neko_the_shadow
提出日時 2016-11-06 11:40:53
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 189 ms / 5,000 ms
コード長 441 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 36,352 KB
最終ジャッジ日時 2024-12-27 10:16:09
合計ジャッジ時間 4,810 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (MAIN)
  (let* ((n (string->number (read-line)))
        (numbers (map string->number (string-split (read-line) #\space)))
        (ht (make-hash-table)))
    (for-each
      (lambda (number) (hash-table-put! ht number (+ 1 (hash-table-get ht number 0))))
      numbers)
    (display
      (hash-table-fold ht
                      (lambda (ky val cnt) (if (= val 1) (+ 1 cnt) cnt))
                      0))
    (newline)))

(MAIN)
0