Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么Time limit E我的代码如下,大牛帮我看看为什么会超时,谢了: #include <cstdio> #include <cmath> #include <iostream> using namespace std ; int main() { char c1 , c2 , c ; float t , d , h , e ; freopen( "3299.in" , "r" , stdin ) ; freopen( "3299.out" , "w" , stdout ) ; scanf( "%c" , &c1 ) ; while ( c1 != 'E' ) { scanf( " %f %c %f" , &t , &c2 , &d ) ; if ( c1 == 'D' ) swap( t , d ) ; e = 6.11 * exp (5417.7530 * ((1/273.16) - (1/(d+273.16)))) ; h = t + 0.5555*( e - 10.0 ) ; printf( "T %.1f D %.1f H %.1f\n" , t , d , h ) ; scanf( "%c" , &c1 ) ; scanf( "%c" , &c1 ) ; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator