Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:输入有点坑。。。。

Posted by yueyibo at 2016-11-16 20:14:52 on Problem 3299
In Reply To:输入有点坑。。。。 Posted by:yueyibo at 2016-11-13 23:28:24
>http://blog.csdn.net/luckcircle/article/details/53160760
 #include<cstdio>
> #include<math.h>
> #include<algorithm>
> float t,d,h,e,H;
> char n;
> int main(){
> 	while(scanf("%c",&n)!=EOF){
> 		t=50000;
> 		d=50000;
> 		h=50000;
> 	switch(n){
> 		case 'T' :scanf("%f",&t);break;
> 		case 'D' :scanf("%f",&d);break;
> 		case 'H' :scanf("%f",&h);break;
> 		case 'E' :return 0;
> 	}
> 	getchar();
> 	scanf("%c",&n);
> 	switch(n){
> 		case 'T' :scanf("%f",&t);break;
> 		case 'D' :scanf("%f",&d);break;
> 		case 'H' :scanf("%f",&h);break;
> 		case 'E' :return 0;
> 	}
> 	getchar();
> 	if(h==50000&&t!=50000&&d!=50000){
> 	e = 6.11*pow(2.718281828,(5417.7530*((1/273.16)-(1/(d+273.16)))));
> 	H=0.5555*(e-10.0);
> 	h=t+H;
> 	}
> 	else if(t==50000&&h!=50000&&d!=50000){
> 			e = 6.11*pow(2.718281828,(5417.7530*((1/273.16)-(1/(d+273.16)))));
> 			H=0.5555*(e-10.0);
> 			t=h-H;
> 	}
> 	else if(d==50000&&h!=50000&&t!=50000){
> 		H=h-t;
> 		e=(H/0.5555)+10.0;
> 		d=(1/(-log(e/6.11)/5417.7530+(1/273.16))-273.16);
> 	}
> 	printf("T %.1f D %.1f H %.1f\n",t,d,h);
> 	}
> } 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator