結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー | ducktail |
提出日時 | 2018-06-08 13:47:04 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 7,219 ms |
コンパイル使用メモリ | 164,712 KB |
実行使用メモリ | 8,248 KB |
最終ジャッジ日時 | 2023-09-12 23:18:42 |
合計ジャッジ時間 | 6,341 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
6,952 KB |
testcase_01 | AC | 3 ms
6,996 KB |
testcase_02 | AC | 3 ms
7,020 KB |
testcase_03 | AC | 4 ms
8,180 KB |
testcase_04 | AC | 4 ms
8,052 KB |
testcase_05 | AC | 4 ms
8,248 KB |
testcase_06 | AC | 4 ms
8,176 KB |
testcase_07 | AC | 4 ms
8,244 KB |
testcase_08 | AC | 4 ms
8,184 KB |
testcase_09 | AC | 4 ms
8,144 KB |
testcase_10 | AC | 4 ms
8,112 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
ソースコード
import Control.Applicative ((<$>)) import Control.Monad (replicateM) import Data.Bool (bool) main :: IO () main = do n <- readLn solve <$> replicateM n (map read <$> words <$> getLine) >>= mapM_ putStrLn solve :: [[Int]] -> [String] solve = map f where f [n, k] = bool "Win" "Lose" $ (n-1) `mod` (k+1) == 0