|
|
вернуться в форумGood advice: don't use real variables, use extended or longint! I got "WA on test 3" nine times, when I stored P and Q as real variables. But when I only substituted "real" by "extended", I got AC. If you don't want to use such advanced methods, like extended type, you can store P*100 and Q*100 as longint. This method gets AC too. Edited by author 23.09.2004 01:04 Re: Good advice: don't use real variables, use extended or longint! Послано 汤润泽 4 фев 2005 09:18 I agree. My program used real variables at first got WA again and again at test 3. Try this test: 24.80 24.83 The right answer is 129 If you use real, the asnwer is 125 24.80 / 100 * 125 = 31.0000000000 24.83 / 100 * 125 = 31.0375000000 Good Luck! Re: Good advice: don't use real variables, use extended or longint! Послано Grab 22 апр 2006 23:39 <...> well, you are rigth Edited by author 23.04.2006 00:12 Re: Good advice: don't use real variables, use extended or longint! Послано Cat 21 фев 2007 21:31 Edited by author 21.02.2007 21:33 Re: Good advice: don't use real variables, use extended or longint! I agree! First, I always WA at text 14, but when I use "extended", I got AC. Re: Good advice: don't use real variables, use extended or longint! You don't need to use any real types in your programs! The problem can be easily solved with integer types! |
|
|