|
|
back to boardPlease tell me WHY I got WA Posted by sky9219 10 Nov 2007 20:07 I use Pascal. program reverseroot; var i,j:longint; a:array[1..10000]of int64; ch1,ch2:char; s:string; begin s:=''; i:=0; while not eof do begin while not eoln do begin read(ch1); if (ch1=' ')and(ch2 in ['0'..'9']) then begin inc(i); val(s,a[i]); s:=''; end; if ch1 in ['0'..'9'] then s:=s+ch1; ch2:=ch1; end; readln; end; inc(i); val(s,a[i]); for j:=i downto 1 do writeln(sqrt(a[j]):0:4); end. |
|
|