結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
okaduki
|
| 提出日時 | 2014-12-04 23:46:37 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 322 bytes |
| コンパイル時間 | 6,006 ms |
| コンパイル使用メモリ | 169,344 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-04 17:10:56 |
| 合計ジャッジ時間 | 3,545 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Control.Applicative import Text.Printf f :: [Int] -> String f (x:y:_) | x == 1 = if y <= 2 then "YES" else "NO" | y == 1 = if x <= 2 then "YES" else "NO" | even $ x*y = "YES" | otherwise = "NO" main = do xs <- take 2 <$> fmap (read :: String -> Int) . words <$> getLine putStrLn $ f xs
okaduki