結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 20:52:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 551 bytes |
| コンパイル時間 | 395 ms |
| コンパイル使用メモリ | 81,492 KB |
| 実行使用メモリ | 80,260 KB |
| 最終ジャッジ日時 | 2025-04-15 20:54:21 |
| 合計ジャッジ時間 | 4,940 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 33 |
ソースコード
from decimal import Decimal, getcontext
getcontext().rounding = 'ROUND_HALF_UP'
prime = [2, 3, 5, 7, 11, 13]
comp = {4, 6, 8, 9, 10, 12}
K = int(input())
if K == 0:
print("0.00000000000000000")
else:
count = 0
for p in prime:
if K % p != 0:
continue
c = K // p
if c in comp:
count += 1
if count == 0:
print("0.00000000000000000")
else:
prob = Decimal(count) / Decimal(36)
formatted = prob.quantize(Decimal('0.000000000000000000'))
print(formatted)
lam6er