結果
| 問題 | No.537 ユーザーID | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-06-20 17:42:30 | 
| 言語 | OCaml (5.2.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 22 ms / 2,000 ms | 
| コード長 | 466 bytes | 
| コンパイル時間 | 435 ms | 
| コンパイル使用メモリ | 21,996 KB | 
| 実行使用メモリ | 6,272 KB | 
| 最終ジャッジ日時 | 2024-10-09 01:30:40 | 
| 合計ジャッジ時間 | 1,902 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 32 | 
ソースコード
Scanf.scanf "%d" (fun n ->
    let module S = Set.Make (struct type t = string let compare = compare end) in
    let rec loop i set =
        if i * i > n then S.cardinal set else
            if n mod i <> 0 then loop (i + 1) set else
                let set = S.add (Printf.sprintf "%d%d" i (n / i)) set in
                let set = S.add (Printf.sprintf "%d%d" (n / i) i) set in
                loop (i + 1) set
    in
    loop 1 S.empty |> Printf.printf "%d\n"
)
            
            
            
        