結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
![]() |
提出日時 | 2025-04-15 20:51:44 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 580 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 80,584 KB |
最終ジャッジ日時 | 2025-04-15 20:52:40 |
合計ジャッジ時間 | 4,839 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | MLE * 33 |
ソースコード
import sys from decimal import Decimal, ROUND_HALF_UP primes = [2, 3, 5, 7, 11, 13] composites = {4, 6, 8, 9, 10, 12} K = int(sys.stdin.readline()) if K == 0: print("0.00000000000000000") else: count = 0 for p in primes: if K % p != 0: continue c = K // p if c in composites: count += 1 if count == 0: print("0.00000000000000000") else: prob = Decimal(count) / Decimal(36) prob_rounded = prob.quantize(Decimal('0.00000000000000000'), rounding=ROUND_HALF_UP) print(prob_rounded)