|
|
back to board1304 Hello! In the description of the input data written: The number n is written without a decimal point. All other numbers are written with not more than two digits after a decimal point (if a number is integer a decimal point may be omitted). All the input numbers are non-negative not greater than 1000. But in the tests (for example, test N7) there are number with more then 2 digits after a decimal point. Please, make the tests correct, or change the problem description. Re: 1304 Why do you think so? Tests are correct. All numbers have no more than two digits after a decimal point. Re: 1304 I wrote code like this (in reading data): scanf( "%lf", &x ); if( fabs( int(x*100)-x*100 )>1e-2 ) throw 0; and my program have been crashed. Try this (+) double x = 4.02; printf("%.2lf %.2lf\n", x, int(x*100)-x*100); |
|
|