結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-23 17:54:51 |
| 言語 | OCaml (5.5.0) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 22,692 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-09-12 07:10:48 |
| 合計ジャッジ時間 | 11,047 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 19 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let rec fact_mod n mm =
let rec inner m acc =
if m = 0 then
acc
else
inner (m - 1) ((m * acc) mod mm) in inner n 1 ;;
let () =
Scanf.sscanf (read_line ()) "%d"
(fun n ->
print_string @@ string_of_int @@ fact_mod n 1000000000000;
print_string "\n")