結果

問題 No.182 新規性の虜
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-11-06 11:40:53
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 145 ms / 5,000 ms
コード長 441 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 5,372 KB
実行使用メモリ 31,128 KB
最終ジャッジ日時 2023-08-27 13:31:59
合計ジャッジ時間 3,597 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
13,760 KB
testcase_01 AC 17 ms
11,680 KB
testcase_02 AC 16 ms
11,652 KB
testcase_03 AC 17 ms
11,848 KB
testcase_04 AC 16 ms
11,760 KB
testcase_05 AC 17 ms
11,728 KB
testcase_06 AC 17 ms
11,748 KB
testcase_07 AC 16 ms
11,844 KB
testcase_08 AC 86 ms
23,060 KB
testcase_09 AC 137 ms
30,696 KB
testcase_10 AC 128 ms
27,096 KB
testcase_11 AC 116 ms
23,080 KB
testcase_12 AC 51 ms
17,184 KB
testcase_13 AC 17 ms
11,688 KB
testcase_14 AC 18 ms
11,836 KB
testcase_15 AC 18 ms
11,828 KB
testcase_16 AC 17 ms
11,832 KB
testcase_17 AC 18 ms
11,668 KB
testcase_18 AC 96 ms
24,464 KB
testcase_19 AC 71 ms
20,528 KB
testcase_20 AC 57 ms
17,724 KB
testcase_21 AC 103 ms
25,364 KB
testcase_22 AC 63 ms
19,440 KB
testcase_23 AC 16 ms
11,644 KB
testcase_24 AC 145 ms
31,128 KB
testcase_25 AC 98 ms
29,684 KB
testcase_26 AC 36 ms
14,184 KB
testcase_27 AC 17 ms
11,804 KB
evil01.txt AC 147 ms
33,060 KB
evil02.txt AC 143 ms
33,284 KB
権限があれば一括ダウンロードができます

ソースコード

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