結果

問題 No.787 Mice and Traitors(ネズミ達と裏切り者)
ユーザー ducktailducktail
提出日時 2019-02-08 23:04:38
言語 Haskell
(9.6.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 2,747 ms
コンパイル使用メモリ 156,336 KB
実行使用メモリ 7,824 KB
最終ジャッジ日時 2023-09-14 03:55:30
合計ジャッジ時間 3,573 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,580 KB
testcase_01 AC 3 ms
7,772 KB
testcase_02 AC 3 ms
7,640 KB
testcase_03 AC 3 ms
7,780 KB
testcase_04 AC 3 ms
7,784 KB
testcase_05 AC 2 ms
7,776 KB
testcase_06 AC 2 ms
7,788 KB
testcase_07 AC 2 ms
7,824 KB
testcase_08 AC 2 ms
7,812 KB
testcase_09 AC 2 ms
7,484 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 )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Applicative
import Text.Printf

main :: IO ()
main = solve <$> f >>= printf "%.10f\n"
  where
    f = map read <$> words <$> getLine

solve :: [Double] -> Double
solve [p, q] = (100 * p * q) / (p * q + (100 - p) * (100 - q))
0