結果
問題 | No.212 素数サイコロと合成数サイコロ (2) |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:00:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 398 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 52,852 KB |
最終ジャッジ日時 | 2025-03-20 21:00:43 |
合計ジャッジ時間 | 1,133 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
p, c = map(int, input().split())sum_prime = 41 # Sum of prime dice faces: 2+3+5+7+11+13 = 41sum_composite = 49 # Sum of composite dice faces: 4+6+8+9+10+12 = 49numerator = (sum_prime ** p) * (sum_composite ** c)denominator = (6 ** (p + c))expected_value = numerator / denominator# Print with enough decimal places to ensure precision up to 1e-15print("{0:.15f}".format(expected_value))