結果
| 問題 | No.374 コイン |
| コンテスト | |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2016-06-04 23:01:04 |
| 言語 | Haskell (9.14.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 337 bytes |
| 記録 | |
| コンパイル時間 | 4,017 ms |
| コンパイル使用メモリ | 197,632 KB |
| 実行使用メモリ | 7,968 KB |
| 最終ジャッジ日時 | 2026-05-08 05:57:29 |
| 合計ジャッジ時間 | 5,172 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative ((<$>))
import Data.Int (Int64)
canSWin :: Integral a => a -> a -> Bool
canSWin a b
| a < b = False
| d < 2 * b = True
| otherwise = False
where d = b - a
main :: IO ()
main = do
[a, b] <- fmap (read :: String -> Int64) . words <$> getLine
putStrLn $ if canSWin a b then "S" else "K"
はむ吉🐹