結果

問題 No.129 お年玉(2)
ユーザー Michae'GonMichae'Gon
提出日時 2015-07-19 06:40:02
言語 Haskell
(9.8.2)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 237 bytes
コンパイル時間 5,506 ms
コンパイル使用メモリ 155,872 KB
実行使用メモリ 18,296 KB
最終ジャッジ日時 2023-08-18 17:23:31
合計ジャッジ時間 7,821 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,144 KB
testcase_01 AC 32 ms
18,092 KB
testcase_02 AC 2 ms
7,320 KB
testcase_03 AC 2 ms
7,224 KB
testcase_04 AC 2 ms
7,200 KB
testcase_05 AC 22 ms
18,240 KB
testcase_06 AC 11 ms
16,924 KB
testcase_07 AC 22 ms
18,088 KB
testcase_08 AC 22 ms
18,144 KB
testcase_09 AC 12 ms
16,312 KB
testcase_10 AC 22 ms
18,088 KB
testcase_11 AC 22 ms
18,152 KB
testcase_12 AC 2 ms
7,800 KB
testcase_13 AC 2 ms
7,568 KB
testcase_14 AC 12 ms
16,940 KB
testcase_15 AC 12 ms
16,984 KB
testcase_16 AC 22 ms
18,140 KB
testcase_17 AC 6 ms
13,316 KB
testcase_18 AC 22 ms
18,100 KB
testcase_19 AC 22 ms
18,148 KB
testcase_20 AC 22 ms
18,004 KB
testcase_21 AC 12 ms
14,188 KB
testcase_22 AC 22 ms
18,160 KB
testcase_23 AC 22 ms
18,068 KB
testcase_24 AC 22 ms
18,232 KB
testcase_25 AC 22 ms
16,896 KB
testcase_26 AC 22 ms
18,220 KB
testcase_27 AC 22 ms
18,136 KB
testcase_28 AC 22 ms
18,192 KB
testcase_29 AC 2 ms
7,176 KB
testcase_30 AC 2 ms
7,232 KB
testcase_31 AC 2 ms
7,208 KB
testcase_32 AC 3 ms
7,360 KB
testcase_33 AC 2 ms
7,380 KB
testcase_34 AC 3 ms
7,468 KB
testcase_35 AC 3 ms
7,372 KB
testcase_36 AC 3 ms
7,632 KB
testcase_37 AC 2 ms
7,464 KB
testcase_38 AC 5 ms
10,504 KB
testcase_39 AC 4 ms
9,648 KB
testcase_40 AC 8 ms
11,636 KB
testcase_41 AC 12 ms
16,096 KB
testcase_42 AC 6 ms
11,780 KB
testcase_43 AC 2 ms
7,752 KB
testcase_44 AC 22 ms
18,296 KB
testcase_45 AC 5 ms
11,552 KB
testcase_46 AC 2 ms
7,904 KB
testcase_47 AC 22 ms
18,088 KB
testcase_48 AC 22 ms
18,108 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 = getContents >>= print . solve . map read . lines

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