結果
| 問題 | 
                            No.500 階乗電卓
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hum_op
                         | 
                    
| 提出日時 | 2017-04-17 14:15:37 | 
| 言語 | F#  (F# 4.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 473 bytes | 
| コンパイル時間 | 6,202 ms | 
| コンパイル使用メモリ | 193,364 KB | 
| 実行使用メモリ | 74,112 KB | 
| 最終ジャッジ日時 | 2024-07-19 05:23:25 | 
| 合計ジャッジ時間 | 12,672 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | -- * 3 | 
| other | TLE * 1 -- * 19 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (210 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.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