zoj 2351 Litmus Test

来源:互联网 发布:sql distinct 编辑:程序博客网 时间:2024/05/16 18:19
#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;}}

原创粉丝点击