結果
問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
ユーザー |
![]() |
提出日時 | 2025-03-31 17:18:22 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 435 bytes |
コンパイル時間 | 131 ms |
コンパイル使用メモリ | 82,776 KB |
実行使用メモリ | 80,772 KB |
最終ジャッジ日時 | 2025-03-31 17:18:55 |
合計ジャッジ時間 | 4,839 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | MLE * 33 |
ソースコード
import sys from decimal import Decimal, ROUND_HALF_UP prime_dice = [2, 3, 5, 7, 11, 13] composite_dice = [4, 6, 8, 9, 10, 12] K = int(sys.stdin.readline()) count = 0 if K != 0: for p in prime_dice: for c in composite_dice: if p * c == K: count += 1 prob = Decimal(count) / Decimal(36) rounded_prob = prob.quantize(Decimal('0.00000000000000000'), rounding=ROUND_HALF_UP) print(rounded_prob)