結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー tottoripapertottoripaper
提出日時 2015-05-22 22:47:12
言語 Haskell
(9.8.2)
結果
AC  
実行時間 1,372 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 678 ms
コンパイル使用メモリ 164,892 KB
実行使用メモリ 12,440 KB
最終ジャッジ日時 2023-09-20 09:42:17
合計ジャッジ時間 3,413 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,460 KB
testcase_01 AC 4 ms
9,008 KB
testcase_02 AC 3 ms
7,516 KB
testcase_03 AC 5 ms
9,528 KB
testcase_04 AC 52 ms
11,796 KB
testcase_05 AC 1,372 ms
12,440 KB
testcase_06 AC 242 ms
12,408 KB
testcase_07 AC 242 ms
12,008 KB
testcase_08 AC 3 ms
7,816 KB
testcase_09 AC 3 ms
8,000 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 #

-- Ω\・8・)チューン

import Control.Monad
import Text.Printf
    
main = do
  [p, c] <- liftM (map read . words) getLine
  let
    s = sum $ (*) <$> (map product (replicateM p [2,3,5,7,11,13])) <*> (map product (replicateM c [4,6,8,9,10,12]))
    e :: Double
    e = fromIntegral s / (6 ** fromIntegral (p + c))
   in printf "%.13f\n" e
0