結果

問題 No.453 製薬会社
ユーザー okadukiokaduki
提出日時 2016-12-09 18:06:58
言語 Haskell
(9.8.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 11,436 ms
コンパイル使用メモリ 166,956 KB
実行使用メモリ 7,456 KB
最終ジャッジ日時 2023-08-19 05:47:50
合計ジャッジ時間 12,156 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,364 KB
testcase_01 AC 3 ms
7,296 KB
testcase_02 AC 3 ms
7,336 KB
testcase_03 AC 3 ms
7,292 KB
testcase_04 AC 3 ms
7,284 KB
testcase_05 AC 2 ms
7,400 KB
testcase_06 AC 2 ms
7,360 KB
testcase_07 AC 3 ms
7,340 KB
testcase_08 AC 3 ms
7,456 KB
testcase_09 AC 3 ms
7,292 KB
testcase_10 AC 3 ms
7,344 KB
testcase_11 AC 2 ms
7,296 KB
testcase_12 AC 3 ms
7,372 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: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

ソースコード

diff #

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)]
	
0