ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Can anyone tell me why I WA at data3
Posted by yyq0310 27 Jun 2007 12:06
This is my source:
program ural1001;

var
   ch:char;
   tmp:int64;
   i,n:longint;
   flag:boolean;
   num:array[0..1000001]of int64;

begin
   n:=0;
   read(ch);
   tmp:=0;
   flag:=false;
   while not seekeof do
      begin
         if (ord(ch)<58)and(ord(ch)>47) then
            if flag then
               tmp:=tmp*10+ord(ch)-48
            else
               begin
                  inc(n);
                  tmp:=ord(ch)-48;
                  flag:=true;
               end
         else
            if flag then
               begin
                  flag:=false;
                  num[n]:=tmp;
               end;
         read(ch);
      end;
   num[n]:=tmp*10+ord(ch)-48;
   for i:=n downto 1 do
       writeln(sqrt(num[i]):0:4);
end.


Help!!
Re: Can anyone tell me why I WA at data3
Posted by yyq0310 27 Jun 2007 12:13
En,Maybe at data4.