結果

問題 No.481 1から10
ユーザー maimai8
提出日時 2019-05-15 09:59:48
言語 OCaml
(5.2.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 21,580 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-09 00:39:28
合計ジャッジ時間 897 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

let rec makelistNtoM n m =
  if n > m then [] else n :: makelistNtoM (n+1) m
let _ =
  let lst = Array.to_list (Array.init 9 (fun _ -> Scanf.scanf "%d " (fun x -> x))) in
  let checklst = makelistNtoM 1 10 in
  let n = List.filter (fun x -> not (List.mem x lst)) checklst in
  Printf.printf "%d\n" (List.hd n)
0