题目大意
给定你三个变量中的两个输出剩下的那一个
题解
没有什么,就是把公式推出来即可,完全的数学题
![](https://img2018.cnblogs.com/blog/1499683/201812/1499683-20181212122851796-1883077879.png)
代码
#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
int main()
{
/*ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);*/
char c;
while(cin>>c)
{
double t=1000,d=1000,h=1000;
if(c=='E')
break;
if(c=='T')
cin>>t;
else if(c=='D')
cin>>d;
else if(c=='H')
cin>>h;
cin>>c;
if(c=='T')
cin>>t;
else if(c=='D')
cin>>d;
else if(c=='H')
cin>>h;
if(t==1000)
{
double e=6.11*exp(5417.753*((1/273.16)-(1/(d+273.16))));
double h1=(0.5555)*(e-10);
t=h-h1;
}
else if(d==1000)
{
double h1=h-t;
double e=h1/0.5555+10;
d=-1/((log(e/6.11)/5417.7530)-(1/273.16))-273.16;
}
else if(h==1000)
{
double e=6.11*exp(5417.753*((1/273.16)-(1/(d+273.16))));
double h1=(0.5555)*(e-10);
h=t+h1;
}
printf("T %.1f D %.1f H %.1f
",t,d,h);
}
}