#include #include using namespace std; using ll = long long; int main(){ int T; cin >> T; while (T--){ ll N, M, K; cin >> N >> M >> K; if (K <= M * (N - 1)){ ll lceil = (K + M - 1) / M; cout << setprecision(15) << 1.0 - (double)lceil / (double)(N * M) << endl; } else{ cout << setprecision(15) << (double)(M * N - K) / (double) M << endl; } } }