結果
問題 |
No.500 階乗電卓
|
ユーザー |
|
提出日時 | 2018-04-25 23:14:32 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 9,160 ms |
コンパイル使用メモリ | 175,596 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 21:05:59 |
合計ジャッジ時間 | 2,468 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative ((<$>)) import Data.List (foldl') main :: IO () main = solve <$> read <$> getLine >>= putStrLn solve :: Int -> String solve n | n >= 50 = "000000000000" | otherwise = let s = show . foldl' (\p x -> p * x `mod` 1000000000000) 1 $ [1..n] in drop (length s - 12) s