結果

問題 No.264 じゃんけん
ユーザー Yuzu MashiroYuzu Mashiro
提出日時 2021-02-21 19:33:14
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 5,822 ms
コンパイル使用メモリ 164,368 KB
実行使用メモリ 5,140 KB
最終ジャッジ日時 2023-10-19 21:07:47
合計ジャッジ時間 6,485 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,112 KB
testcase_02 AC 2 ms
5,112 KB
testcase_03 AC 2 ms
5,112 KB
testcase_04 WA -
testcase_05 AC 2 ms
5,112 KB
testcase_06 AC 2 ms
5,112 KB
testcase_07 AC 2 ms
5,112 KB
testcase_08 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

janken :: Int -> Int -> String
janken me you
  | me == you = "Draw"
  | me - you == -1 || me - you == 2 = "Won"
  | otherwise = "Lost"

main :: IO ()
main =
  getNums
    >>= (\[a, b] -> return (janken a b))
    >>= putStrLn
  where
    getNums = map read . words <$> getLine
0