結果
| 問題 |
No.242 ビンゴゲーム
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:32:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 418 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 82,892 KB |
| 実行使用メモリ | 53,600 KB |
| 最終ジャッジ日時 | 2025-03-20 20:33:03 |
| 合計ジャッジ時間 | 1,260 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 |
ソースコード
N = int(input())
if N < 5:
print(0.0)
else:
# Calculate numerator
numerator = N * (N-1) * (N-2) * (N-3) * (N-4)
# Precomputed denominator: 99*98*97*96*95 = 8582777280
denominator = 8582777280
# Probability for one line
prob = numerator / denominator
# Expected total bingos (12 lines)
expected = 12 * prob
# Print with sufficient precision
print("{0:.11f}".format(expected))
lam6er