結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-01-10 00:26:03 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 263 bytes |
| コンパイル時間 | 34 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 397,344 KB |
| 最終ジャッジ日時 | 2024-09-19 15:53:36 |
| 合計ジャッジ時間 | 7,179 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 TLE * 1 -- * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
sosuu = [2,3,5,7,11,13]
gousei = [4,6,8,9,10,12]
P,C = gets.split.map(&:to_i)
pattern = 6 ** (P + C)
p sosuu.repeated_permutation(P).map(&:to_a).product(gousei.repeated_permutation(C).map(&:to_a)).map(&:flatten).map{|a|a.inject(&:*)}.inject(&:+) * 1.0 / pattern