結果
| 問題 | 
                            No.212 素数サイコロと合成数サイコロ (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tottoripaper
                         | 
                    
| 提出日時 | 2015-05-23 18:04:01 | 
| 言語 | Haskell  (9.10.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 263 bytes | 
| コンパイル時間 | 10,106 ms | 
| コンパイル使用メモリ | 172,032 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-06 06:22:21 | 
| 合計ジャッジ時間 | 8,043 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
コンパイルメッセージ
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
ソースコード
import Control.Monad
import Text.Printf
    
main = do
  [p, c] <- liftM (map read . words) getLine
  let
      s = sum [2,3,5,7,11,13] ^ p * sum [4,6,8,9,10,12] ^ c
      e :: Double
      e = fromIntegral s / (6 ** fromIntegral (p + c))
   in printf "%.13f\n" e
            
            
            
        
            
tottoripaper