結果

問題 No.129 お年玉(2)
ユーザー Michae'Gon
提出日時 2015-07-19 06:38:57
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 220 bytes
コンパイル時間 1,802 ms
コンパイル使用メモリ 176,256 KB
実行使用メモリ 15,244 KB
最終ジャッジ日時 2024-07-08 10:19:17
合計ジャッジ時間 3,149 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

main = getContents >>= print . solve . map read . lines

solve :: [Integer] -> Integer
solve [n, m] = c m l
    where
        l = mod n (m * 1000) `div` 1000
        c a b = product [(a - b + 1)..a] `div` product [2..b]
0