結果

問題 No.63 ポッキーゲーム
ユーザー US18650US18650
提出日時 2017-05-14 04:58:32
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 924 ms
コンパイル使用メモリ 159,124 KB
実行使用メモリ 813,684 KB
最終ジャッジ日時 2023-10-13 16:57:57
合計ジャッジ時間 5,219 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,996 KB
testcase_01 AC 2 ms
7,184 KB
testcase_02 AC 3 ms
6,884 KB
testcase_03 AC 2 ms
7,088 KB
testcase_04 WA -
testcase_05 AC 2 ms
7,016 KB
testcase_06 WA -
testcase_07 AC 4 ms
8,684 KB
testcase_08 AC 2 ms
7,704 KB
testcase_09 AC 22 ms
14,568 KB
testcase_10 AC 182 ms
89,700 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

solve l k
    | l > k = k + solve (l-2*k) k
    | otherwise = 0

main :: IO ()
main = do
    [l,k] <- readDigits
    putStrLn . show $ solve l k
0