結果

問題 No.63 ポッキーゲーム
ユーザー momen999momen999
提出日時 2017-04-23 18:21:20
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 5,054 ms
コンパイル使用メモリ 157,652 KB
実行使用メモリ 7,060 KB
最終ジャッジ日時 2023-09-29 15:57:34
合計ジャッジ時間 7,012 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,872 KB
testcase_01 AC 3 ms
7,056 KB
testcase_02 AC 2 ms
6,856 KB
testcase_03 AC 2 ms
6,964 KB
testcase_04 AC 2 ms
7,044 KB
testcase_05 AC 2 ms
6,972 KB
testcase_06 AC 2 ms
6,968 KB
testcase_07 AC 2 ms
6,948 KB
testcase_08 AC 2 ms
6,960 KB
testcase_09 AC 2 ms
6,976 KB
testcase_10 AC 2 ms
7,032 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,984 KB
testcase_13 WA -
testcase_14 AC 2 ms
6,972 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
7,044 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 #

import Control.Monad

rInt :: String -> Int
rInt = read

pokkyGame l k
    | l <= k * 2    = 0     -- 一度も齧れない
    | otherwise     = k * kaisuu
    where
        kaisuu = l `div` (k * 2)

main = do
    lk <- map rInt . words <$> getLine
    print $ pokkyGame (lk !! 0) (lk !! 1)
0