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

为什么Time limit E

Posted by phoenixnirvana at 2011-02-22 20:26:18 on Problem 3299
我的代码如下,大牛帮我看看为什么会超时,谢了:

#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:
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