結果
問題 | No.453 製薬会社 |
ユーザー | okaduki |
提出日時 | 2016-12-09 18:06:58 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 11,761 ms |
コンパイル使用メモリ | 175,232 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-28 19:33:17 |
合計ジャッジ時間 | 12,623 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:6:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in two further locations. Suggested fix: Please use spaces instead. | 6 | [c,d] <- map (read :: String -> Double) . words <$> getLine | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
import Control.Monad import Control.Applicative((<$>)) f (a,b) = if a < 0 || b < 0 then 0 else a * 1000 + b * 2000 main = do [c,d] <- map (read :: String -> Double) . words <$> getLine print $ maximum $ map f [(0, min (3.5*c) (1.2*d)), (min (4.0/3.0*c) (4*d), 0), ((5/7*c-2/7*d)*28/13, (-0.25*c+0.75*d)*28/13)]