Var i,a,b,c,d,temp:integer; begin for i:=1000 to 9999 do begin temp:=i a:=temp div 1000; temp:= temp mod 1000; b:=temp div 100; temp:= temp mod 100; c:=temp div 10; d:= temp mod 10; if (a<>b)and(a<>c)and(a<>d)and(b<>c)and(b<>d)and(c<>d) then writeln(i); end; end.
begin
for i:=1000 to 9999 do
begin
temp:=i
a:=temp div 1000;
temp:= temp mod 1000;
b:=temp div 100;
temp:= temp mod 100;
c:=temp div 10;
d:= temp mod 10;
if (a<>b)and(a<>c)and(a<>d)and(b<>c)and(b<>d)and(c<>d) then writeln(i);
end;
end.