#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
    int t;
    cin >> t;
    const double denominator = pow(16, 16);
    for (int i = 0; i < t; i++) {
        int a, b, c;
        cin >> a >> b >> c;
        double numerator = pow(a, 16) + 1820 * pow(a, 12) * (pow(b, 4) + pow(c, 4));
        double P = numerator / denominator;
        cout << fixed << setprecision(10) << P << endl;
    }
    return 0;
}