結果
問題 | No.264 じゃんけん |
ユーザー | vain0 |
提出日時 | 2015-08-07 23:44:26 |
言語 | Haskell (9.6.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 612 bytes |
コンパイル時間 | 2,582 ms |
コンパイル使用メモリ | 165,660 KB |
実行使用メモリ | 7,040 KB |
最終ジャッジ日時 | 2023-09-25 06:27:52 |
合計ジャッジ時間 | 2,615 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,848 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 2 ms
6,796 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 3 ms
6,800 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 ) Main.hs:21:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in 7 further locations. Suggested fix: Please use spaces instead. | 21 | | i == (weak j) = "Win" | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
import Control.Monad import Control.Applicative import Data.Traversable (sequenceA) import qualified Data.Map.Strict as Map import Data.Bits import Data.Char import Data.Ix import Data.Array.IO import Data.Array.ST import Data.Array.Unboxed import Data.Array.IArray import Data.Array.Base(unsafeRead, unsafeWrite) import Data.Maybe import Text.Printf import System.IO readInt :: String -> Int readInt = read rsp i j | i == (weak j) = "Win" | j == (weak i) = "Lose" | otherwise = "Drew" where weak k = (k + 2) `mod` 3 main = do [n, k] <- fmap (map readInt . words) getLine putStrLn $ rsp n k