結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2020-06-21 11:11:44 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 157 ms / 5,000 ms |
コード長 | 449 bytes |
コンパイル時間 | 297 ms |
コンパイル使用メモリ | 21,708 KB |
実行使用メモリ | 14,336 KB |
最終ジャッジ日時 | 2024-10-09 01:34:30 |
合計ジャッジ時間 | 2,554 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
Scanf.scanf "%d" (fun n -> let module M = Map.Make (struct type t = int let compare = compare end) in let rec loop i map = if i = n then map else let map = Scanf.scanf " %d"(fun a -> M.add a (1 + try M.find a map with _ -> 0) map) in loop (i + 1) map in let map = loop 0 M.empty in M.fold (fun k v acc -> if v = 1 then acc + 1 else acc) map 0 |> Printf.printf "%d\n" )