#include #include // For std::fixed and std::setprecision // For N >= 7, E_0(N) = (C1_D + C2_D*N) / C3_D // C1_val = 1022154 // C2_val = 559872 // C3_val = 496951 const double C1_D = 1022154.0; const double C2_D = 559872.0; const double C3_D = 496951.0; int main() { // Fast I/O std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); // Set output precision. Sample output for N=7 has 13 decimal places. std::cout << std::fixed << std::setprecision(13); int T; std::cin >> T; while (T--) { long long N_ll; std::cin >> N_ll; if (N_ll <= 6) { std::cout << 6.0 << std::endl; } else { double N_double = static_cast(N_ll); double result = (C1_D + C2_D * N_double) / C3_D; std::cout << result << std::endl; } } return 0; }