{$N+,$E+}
program fracdec;
var n,m:extended;u:string;i,j,k,l:longint;
begin
assign(input,'fracdec.in');
assign(output,'fracdec.out');
reset(input);
rewrite(output);
read(n,m);n:=n/m;
str(n,u);
k:=pos('.',u);
l:=1;
repeat
for j:=k+1 to length(u)-1 do
for i:=j+1 to length(u) do
if copy(u,j,l)<>copy(u,i,l) then l:=l+1 else begin insert('(',u,l);insert(')',u,length(u)+2);
write(u);close(input);close(output);halt;end;
until l>length(u)-k;
write(u);
close(input);
close(output);
end.
这个程序的问题在哪?