Chinaunix首页 | 论坛 | 博客
  • 博客访问: 128292
  • 博文数量: 31
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 275
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-08 15:00
文章分类

全部博文(31)

文章存档

2009年(15)

2008年(16)

我的朋友

分类:

2009-03-19 10:16:05

#include
#include

using namespace std;
double T, D, H, e, h;
int main()
{
 //freopen("input.txt","r",stdin);
 char c1,c2;
 double num1, num2, num3;
 while(EOF!=scanf("%c",&c1),c1!='E')
 {
  scanf("%lf %c %lf", &num1, &c2, &num2);
  if(c1=='T'&&c2=='D')
  {
   e = 6.11 * exp (5417.7530 * ((1/273.16) - (1/(num2+273.16))));
   h = (0.5555)* (e - 10.0);
   num3 = num1 + h;
   printf("T %.1lf D %.1lf H %.1lf\n",num1,num2,num3);
   continue;
  }
   if(c1 == 'T' && c2 == 'H')
   {
   num3 = 1/((1/273.16)- log( ((num2 - num1) / 0.5555 + 10.0 )/6.11 ) /5417.7530 ) -273.16;
   printf("T %.1lf D %.1lf H %.1lf\n",num1,num3,num2);
   continue;
   }
  if(c1 == 'D' && c2 == 'H'){
   e = 6.11 * exp(5417.7530 * ((1/273.16) - (1 / (num1+273.16) )));
   h = (0.5555)* (e - 10.0);
   num3 = num2 - h;
   printf("T %.1lf D %.1lf H %.1lf\n",num3,num1,num2);
   continue;
  }
  if(c1 == 'D' && c2 == 'T')
  {
   e = 6.11 * exp(5417.7530 * ((1/273.16) - (1 / (num1+273.16) )));
   h = (0.5555)* (e - 10.0);
   num3 = num2 + h;
   printf("T %.1lf D %.1lf H %.1lf\n",num2,num1,num3);
   continue;
   }
  if(c1 == 'H' && c2 == 'T'){
   num3 = 1/((1/273.16)- log( ((num1 - num2) / 0.5555 + 10.0 )/6.11 ) /5417.7530 ) -273.16;
   printf("T %.1lf D %.1lf H %.1lf\n",num2,num3,num1);
   continue;
  }
  if(c1 == 'H' && c2 == 'D'){
   e = 6.11 * exp(5417.7530 * ((1/273.16) - (1 / (num2+273.16) )));
   h = (0.5555)* (e - 10.0);
   num3 = num1 - h;
   printf("T %.1lf D %.1lf H %.1lf\n",num3,num2,num1);
   continue;
  }
 }
 return 0;
}

阅读(902) | 评论(0) | 转发(0) |
0

上一篇:ACM POJ 1002

下一篇:ACM POJ 2159

给主人留下些什么吧!~~