|  | 
|  | 
| back to board | Ok , I'm about to give up Posted by Jim  10 Jul 2008 08:21Hi,
 On my local machine I get the same output as the example set. However after 3 submissions I still get Wrong Answer. If this is a case of unfamiliarity with the system then it's a real pain.
 
 Here is my submission, can anyone see why it fails?
 
 program Timus1001(input, output);
 
 {$APPTYPE CONSOLE}
 
 {$IFDEF ONLINE_JUDGE}
 {$M 16777216}
 {$ENDIF}
 
 uses
 SysUtils;
 
 var
 Count        :            Integer;
 Value        :            Int64;
 VArray    :            Array[1..33000] of QWord;
 
 begin
 {$IFNDEF ONLINE_JUDGE}
 assign(input, 'input.txt');
 reset(input);
 assign(output, 'output.txt');
 rewrite(output);
 {$ENDIF}
 Count := 0;
 while NOT seekEof(input) do
 begin
 Read(Value);
 Count := Count + 1;
 VArray[Count] := Value;
 end;
 
 while Count > 0 do
 begin
 WriteLn(Format('%.4f',[Sqrt(VArray[Count])]));
 Count := Count -1;
 end;
 {$IFNDEF ONLINE_JUDGE}
 close(input);
 close(output);
 {$ENDIF}
 
 end.
Re: Ok , I'm about to give up Where have you found such a strange way of writing reals? In Pascal this is usually done just with
 Write (r :0 :4);
 
 , for example. RTFM! =)
 
 Edited by author 10.07.2008 15:16
Re: Ok , I'm about to give up Posted by Jim  13 Jul 2008 08:02Cos I use Delphi and I find the Format function a much better way of formating items, and FPC has a Delphi mode. | 
 | 
|