#include "iostream"
#include "stdio.h"
#include "cmath"
#include "iomanip"
using namespace std;
int main()
{
int testcase, m, n;
double k, a, ph;
cin >> testcase;
while (testcase--)
{
while (scanf("%le%le%d%d", &k, &a, &m, &n) && k && a && m && n)
{
ph = -log10((sqrt(k * k + 4 * k * a * m * n)-k)/2/n);
cout.setf(ios::fixed);
cout << setprecision(3) << ph << endl;
}
if (testcase)
cout << endl;
}
}
zoj 2351 Litmus Test
最新推荐文章于 2024-03-28 09:39:26 发布