結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2017-04-23 18:42:02 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 2,164 ms |
コンパイル使用メモリ | 173,144 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 10:05:12 |
合計ジャッジ時間 | 3,090 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 2 |
コンパイルメッセージ
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
ソースコード
import Control.Monad rInt :: String -> Int rInt = read pokkyGame l k | l <= k2 = 0 -- 一度も齧れない | k == 1 = l `div` 2 - 1 | l `mod` k2 == 0 = k * (kaisuu - 1) | otherwise = k * kaisuu where k2 = k * 2 kaisuu = l `div` k2 main = do lk <- map rInt . words <$> getLine print $ pokkyGame (lk !! 0) (lk !! 1)