結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
hum_op
|
| 提出日時 | 2017-04-17 14:15:37 |
| 言語 | F# (F# 10.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 7,849 ms |
| コンパイル使用メモリ | 212,120 KB |
| 実行使用メモリ | 300,536 KB |
| 最終ジャッジ日時 | 2026-04-02 14:26:47 |
| 合計ジャッジ時間 | 18,038 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 19 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (254 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
open System
let No500 () =
let N = Numerics.BigInteger.Parse <| Console.ReadLine()
let rec fac (n : Numerics.BigInteger) (f : Numerics.BigInteger) =
if n = (Numerics.BigInteger.Parse "1") then
f
else
fac (n - (Numerics.BigInteger.Parse "1")) (f * n)
let ans = (fac N (Numerics.BigInteger.Parse "1") ).ToString()
for i = ans.Length - 12 to ans.Length - 1 do
printf "%c" ans.[i]
done
()
No500 ()
hum_op