|
|
вернуться в форумОбщий форумWhere is it wrong? (Problem 10) {$N+} var n: extended; k: extended; begin readln(n); k:=n*n; writeln (k:0:0); writeln (n:0:0); end. Re: Where is it wrong? (Problem 10) rounding value :) you should do the calculating with big integers manually ;) Re: Where is it wrong? (Problem 10) I got AC with extended, so I don't think that we need big integers to solve this problem Re: Where is it wrong? (Problem 10) Послано gufy 16 окт 2004 20:56 I had literally the same program and WA #12. though I'm sure that I won't be out of extended! see, (N^2)^2/N^3=N, therefore the solution is correct. moreover, the input data can't be more than 10^9, so N^2<=10^18 which is OK for extended. Maybe 'tis just one more difference between Turbo Pascal and Free Pascal Re: Where is it wrong? (Problem 10) Послано gufy 17 окт 2004 19:59 The problem has been in FreePascal, of course. In both TP70 and Delphi, it is OK, but at Timus you need to use the type int64, which exists only in Delphi and FreePascal, but not in TP70. BTW, it is an integral type, so you don't need to output N:0:0, but simply N. обидно, блин Edited by author 17.10.2004 20:01 |
|
|