結果

問題 No.420 mod2漸化式
ユーザー ducktailducktail
提出日時 2018-08-19 13:38:02
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 172,928 KB
実行使用メモリ 14,620 KB
最終ジャッジ日時 2024-04-28 12:04:35
合計ジャッジ時間 5,184 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
10,624 KB
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 1 ms
5,376 KB
testcase_34 RE -
testcase_35 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

import Control.Applicative

main :: IO ()
main = solve <$> readLn >>= putStrLn

solve :: Int -> String
solve x = unwords . map show $ [comb 31 x, comb 30 (x-1) * 2147483647]

comb n m = product (take m [n, n-1 ..]) `div` product [1..m]
0