結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2017-08-17 18:44:44 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 17 ms / 2,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 21,144 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-10-09 00:26:16 |
合計ジャッジ時間 | 1,542 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
module S = Set.Make (struct type t = string let compare = String.compare end) let () = let n = read_int () in let rec doit i s = if i * i > n then s else doit (i + 1) (if n mod i <> 0 then s else let x, y = string_of_int i, string_of_int (n / i) in S.(s |> add (x ^ y) |> add (y ^ x))) in doit 1 S.empty |> S.cardinal |> Printf.printf "%d\n"