結果

問題 No.445 得点
ユーザー Ysmr_Ry
提出日時 2016-11-23 22:59:25
言語 Haskell
(9.10.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 299 bytes
コンパイル時間 4,493 ms
コンパイル使用メモリ 173,568 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-11 19:52:22
合計ジャッジ時間 5,274 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

import Control.Applicative ((<$>))

main :: IO ()
main = do
  [a,b] <- map read . words <$> getLine :: IO [Double]
  print $ floor (50*a + floor' (50.0*a/(0.8+0.2*b)))

floor' :: Double -> Double
floor' x = if x-x' > 0.9 then fromIntegral (ceiling x) else x' 
  where
    x' = fromIntegral $ floor x
0