結果

問題 No.201 yukicoderじゃんけん
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-21 20:50:18
言語 Haskell
(9.8.2)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 811 ms
コンパイル使用メモリ 157,184 KB
実行使用メモリ 12,352 KB
最終ジャッジ日時 2023-09-29 17:21:05
合計ジャッジ時間 1,646 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,228 KB
testcase_01 AC 3 ms
7,272 KB
testcase_02 AC 3 ms
6,992 KB
testcase_03 AC 4 ms
8,628 KB
testcase_04 AC 3 ms
8,156 KB
testcase_05 AC 3 ms
7,936 KB
testcase_06 AC 3 ms
7,956 KB
testcase_07 AC 3 ms
7,420 KB
testcase_08 AC 4 ms
8,612 KB
testcase_09 AC 4 ms
8,640 KB
testcase_10 AC 3 ms
7,996 KB
testcase_11 AC 4 ms
8,672 KB
testcase_12 AC 4 ms
8,504 KB
testcase_13 AC 3 ms
8,504 KB
testcase_14 AC 3 ms
7,596 KB
testcase_15 AC 12 ms
12,280 KB
testcase_16 AC 12 ms
12,320 KB
testcase_17 AC 12 ms
12,352 KB
testcase_18 AC 12 ms
12,292 KB
testcase_19 AC 12 ms
12,328 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

ソースコード

diff #

judge :: [String] -> String
judge (sa : pa : sb : pb : _)
    | pa' > pb'   = sa
    | pb' > pa'   = sb
    | otherwise = "-1"
    where
        pa' = read pa :: Integer
        pb' = read pb :: Integer

main :: IO ()
main = putStrLn . judge . concat . map (take 2) . map words . lines =<< getContents
0