//关键是一条公式
#include <iostream>
#include <iomanip>
#include <math.h>

 

using namespace std;

int main()
{
    int case_num;
    cin>>case_num;
    while(case_num--)
    {
       double ka,ori;                //这里科学记录法可以作为输入
       int m,n;
       while((cin>>ka>>ori>>m>>n) && m&&n&&ka&&ori)
       {
            double pH;
            pH = (-1)*log10((sqrt(4*m*n*ka*ori+ka*ka)-ka)/(2*n));
            cout<<setiosflags(ios::fixed)<<setprecision(3)<<pH<<endl;
       }
       if(case_num>0)
            cout<<endl;
    }
}

 

相关文章:

  • 2022-12-23
  • 2021-07-06
  • 2021-05-28
  • 2022-01-05
  • 2021-07-31
  • 2021-05-16
猜你喜欢
  • 2021-05-29
  • 2021-07-10
  • 2021-12-28
  • 2022-12-23
  • 2022-01-10
  • 2022-01-14
  • 2021-12-03
相关资源
相似解决方案