UVA 11346 Possibility

#include<bits/stdc++.h>
#include<stdio.h>
#include<iostream>
#include<cmath>
#include<math.h>
#include<queue>
#include<set>
#include<map>
#include<iomanip>
#include<algorithm>
#include<stack>
#define inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
#endif // ONLIN
    int t;
    scanf("%d",&t);
    double a,b;double s;
    while(t--)
    {
        cin>>a>>b>>s;
        if(s>=a*b){cout<<"0.000000%"<<endl;continue;}
        else if(fabs(s)<0.00000000001){cout<<"100.000000%"<<endl;continue;}
        double m=a*b;
        double ans=(m-s-s*log(m/s))/m;
        ans*=100;
        printf("%.6f%\n",ans);
    }
}

 

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-11-19
  • 2021-09-22
相关资源
相似解决方案