結果
| 問題 | No.3483 A Forbidden Fruit |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-03-27 21:46:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 424 bytes |
| 記録 | |
| コンパイル時間 | 206 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 87,936 KB |
| 最終ジャッジ日時 | 2026-03-27 21:47:06 |
| 合計ジャッジ時間 | 4,007 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 15 |
ソースコード
from sys import stdin
input = stdin.readline
for _ in range(int(input())):
N, M, K = map(int, input().split())
ans = 1
now = 1
for i in range(N):
if K <= M*i:
break
ans -= now/(N-i)/M
now *= (N-i-1)/(N-i)
now = 1
for i in range(M-1):
if K <= M*(N-1)+1+i:
break
ans -= now/(M-1-i)*(M-1)/M
now *= (M-i-2)/(M-1-i)
print(ans)
detteiuu