题意:已知两数,根据公式求第三个数。
分析:
1、.lfG++编译不过的C++可能编译过。
2、输出.lf改成.f后G++可编译过。
#pragma comment(linker, "/STACK:102400000, 102400000")
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<iomanip>
#include<cmath>
#include<iostream>
#include<sstream>
#include<iterator>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<list>
#define Min(a, b) ((a < b) ? a : b)
#define Max(a, b) ((a < b) ? b : a)
const double eps = 1e-8;
inline int dcmp(double a, double b){
if(fabs(a - b) < eps) return 0;
return a > b ? 1 : -1;
}
typedef long long LL;
typedef unsigned long long ULL;
const int INT_INF = 0x3f3f3f3f;
const int INT_M_INF = 0x7f7f7f7f;
const LL LL_INF = 0x3f3f3f3f3f3f3f3f;
const LL LL_M_INF = 0x7f7f7f7f7f7f7f7f;
const int dr[] = {0, 0, -1, 1, -1, -1, 1, 1};
const int dc[] = {-1, 1, 0, 0, -1, 1, -1, 1};
const int MOD = 1e9 + 7;
const double pi = acos(-1.0);
const int MAXN = 10000 + 10;
const int MAXT = 10000 + 10;
using namespace std;
int main()
{
char a;
while(1){
double T = 200.0, D = 200.0, H = 200.0;
for(int i = 0; i < 2; ++i){
cin >> a;
if(a == 'E') return 0;
if(a == 'T'){
cin >> T;
}
else if(a == 'D'){
cin >> D;
}
else if(a == 'H'){
cin >> H;
}
}
if(H == 200.0){
H = T + 0.5555 * (6.11 * exp(5417.7530 * (1 / 273.16 - 1 / (D + 273.16))) - 10.0);
}
else if(T == 200.0){
T = H - 0.5555 * (6.11 * exp(5417.7530 * (1 / 273.16 - 1 / (D + 273.16))) - 10.0);
}
else if(D == 200.0){
D = 1 / (1 / 273.16 - log(((H - T) / 0.5555 + 10.0) / 6.11) / 5417.7530) - 273.16;
}
printf("T %.1f D %.1f H %.1f\n", T, D, H);
}
return 0;
}