POJ 3299
来源:互联网 发布:淘宝童装模特拍摄价格 编辑:程序博客网 时间:2024/04/29 04:50
#include <iostream>#include<cstdio>#include<cmath>using namespace std;const char *s="TDH";double tem,dew,ham;void TD() { double e=6.11*exp(5417.7530*((1.0/273.16)-(1.0/(dew+273.16)))); double h=0.5555*(e-10.0); ham=tem+h; } void TH() { double h=ham-tem; double e=(h/0.5555)+10.0; double a=e/6.11; double b=log(a); double c=b/5417.7530; double d=(1.0/273.16)-c; dew=(1.0/d)-273.16; } void DH() { double e=6.11 * exp (5417.7530 * ((1.0/273.16) - (1.0/(dew+273.16)))); double h=0.5555*(e-10.0); tem=ham-h; } int main() { char a,b; double x,y; while(cin>>a) { if(a=='E') break; cin>>x>>b>>y; int k,t; for(int i=0;i<3;i++) { if(a==s[i]) k=i; if(b==s[i]) t=i; } if(k==0&&t==1) { tem=x; dew=y; TD();} else if(k==1&&t==0) {dew=x; tem=y; TD();} else if(k==0&&t==2) { tem=x; ham=y; TH();} else if(k==2&&t==0) {ham=x; tem=y; TH();} else if(k==1&&t==2) {dew=x; ham=y; DH();} else if(k==2&&t==1) { ham=x; dew=y; DH();} printf("T %.1f D %.1f H %.1f\n",tem,dew,ham); } return 0; }
阅读全文
0 0
- poj 3299
- POJ 3299
- poj 3299
- POJ 3299
- poj 3299
- POJ 3299
- POJ 3299
- poj 3299
- POJ 3299
- poj 3299
- poj 3299
- poj 3299
- POJ 3299
- poj 3299
- POJ 3299
- POJ 3299
- POJ 3299
- poj 3299
- css设置不允许复制文本内容
- Java后台框架篇--Struts2.0与Action
- Nandflash 和 Norflash 启动
- 算法第二周(模拟、巩固排序)
- Python趣事-5-集合
- POJ 3299
- 逆序
- 写时拷贝技术
- 【深度学习】图像分类问题笔记
- SSM结合Ajax实现文件上传及分页
- 洛谷 1372 又是毕业季I 趣题
- Java后台框架篇--Struts2.0之Action的参数接收
- gedit plugins
- struts2-spring-plugin-2.1.8.jar 问题