|
|
вернуться в форумPrecision problem I've writtan the program and it seems that I use correct solution. But the output for the sample is: 0.32985 0.33622 0.33390 Extended in Pascal doesn't help. Should we use some specific things? Re: Precision problem Послано sgn 14 дек 2005 19:42 I have WA on test 9 and I don't know why too :) Re: Precision problem 0.32985 0.33622 0.33390 The sum of this number is not 1. But I make next operations: I write N-1 numbers as I find in program. And the last number I write as subtraction 1 and N-1 previous numbers. So I have WA2. Can somebody explain me why? Re: Precision problem 992050/2971042=0,33390642071.... maybe use round(100000*x)/100000? Re: Precision problem You can just output not 5 digits after decimal point, but more. I've outputted 8 digits - and AC in 1st attempt... My program finds not 5, but 10 exact digits after decimal point. P. S. I've used not extended, but even REAL in Pascal... P. P. S. And if my program outputs 5 digits - it's output corresponds to the sample output. So, may be your algo isn't right? Edited by author 30.06.2006 14:03 |
|
|