結果

問題 No.63 ポッキーゲーム
ユーザー US18650US18650
提出日時 2017-05-14 05:20:10
言語 Haskell
(9.8.2)
結果
MLE  
実行時間 -
コード長 264 bytes
コンパイル時間 6,647 ms
コンパイル使用メモリ 157,084 KB
実行使用メモリ 818,244 KB
最終ジャッジ日時 2023-10-13 17:07:17
合計ジャッジ時間 15,196 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,012 KB
testcase_01 AC 2 ms
7,040 KB
testcase_02 AC 2 ms
6,992 KB
testcase_03 AC 2 ms
7,056 KB
testcase_04 AC 3 ms
7,092 KB
testcase_05 AC 2 ms
7,120 KB
testcase_06 AC 2 ms
7,128 KB
testcase_07 AC 12 ms
12,948 KB
testcase_08 AC 6 ms
11,748 KB
testcase_09 AC 32 ms
19,956 KB
testcase_10 AC 252 ms
93,732 KB
testcase_11 MLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

readDigits :: IO [Int]
readDigits = map read <$> words <$> getLine

main :: IO ()
main = do
    [l,k] <- readDigits
    let ls = [l,(l-k)..0]
    putStrLn . show $ go k [n | n<-ls, n>k]
    where
    go _ [] = 0
    go _ (_:[]) = 0
    go k (a:b:xs) = k + go k xs
0