結果

問題 No.502 階乗を計算するだけ
ユーザー 佐藤淳平佐藤淳平
提出日時 2019-09-09 09:49:42
言語 Haskell
(9.8.2)
結果
MLE  
実行時間 -
コード長 172 bytes
コンパイル時間 9,930 ms
コンパイル使用メモリ 156,504 KB
実行使用メモリ 700,652 KB
最終ジャッジ日時 2023-09-10 18:02:29
合計ジャッジ時間 14,619 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
11,180 KB
testcase_01 AC 3 ms
6,952 KB
testcase_02 AC 3 ms
6,992 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 3 ms
6,904 KB
testcase_05 AC 2 ms
6,936 KB
testcase_06 AC 2 ms
6,852 KB
testcase_07 AC 3 ms
7,016 KB
testcase_08 AC 2 ms
6,960 KB
testcase_09 AC 2 ms
6,920 KB
testcase_10 AC 3 ms
6,868 KB
testcase_11 AC 2 ms
6,900 KB
testcase_12 AC 3 ms
6,812 KB
testcase_13 AC 2 ms
6,896 KB
testcase_14 AC 2 ms
6,856 KB
testcase_15 AC 3 ms
6,924 KB
testcase_16 AC 2 ms
7,016 KB
testcase_17 AC 2 ms
6,884 KB
testcase_18 AC 2 ms
6,908 KB
testcase_19 AC 3 ms
6,868 KB
testcase_20 AC 2 ms
6,896 KB
testcase_21 AC 3 ms
6,892 KB
testcase_22 AC 172 ms
44,892 KB
testcase_23 AC 52 ms
22,236 KB
testcase_24 AC 122 ms
37,844 KB
testcase_25 AC 22 ms
12,580 KB
testcase_26 AC 72 ms
25,336 KB
testcase_27 AC 42 ms
18,868 KB
testcase_28 AC 62 ms
23,244 KB
testcase_29 AC 32 ms
14,844 KB
testcase_30 AC 152 ms
43,012 KB
testcase_31 AC 82 ms
28,260 KB
testcase_32 MLE -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main :: IO ()
main = do
    n <- readLn
    print $ f n

f :: Integer -> Integer
f 0 = 1
f 1 = 1
f m = (m `mod` 1000000007) * (f (m - 1) `mod` 1000000007) `mod` 1000000007
0