結果

問題 No.182 新規性の虜
ユーザー Common Lisp
提出日時 2024-10-30 21:56:03
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 405 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 36,012 KB
実行使用メモリ 42,996 KB
最終ジャッジ日時 2024-10-30 21:56:07
合計ジャッジ時間 3,371 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 30 OCT 2024 09:56:04 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.010

ソースコード

diff #

(defun main (&rest argv)
  (declare (ignore argv))
  (let* ((n (read))
         (xs (loop repeat n collect (read)))
         (num (make-hash-table))
         (ans 0))
    (dolist (i xs)
      (incf (gethash i num 0)))
    (maphash (lambda (key val)
               (declare (ignore key))
               (when (= val 1)
                     (incf ans)))
             num)
    (format t "~A~%" ans)))

(main)
0