Uses crt; var p,l,o,m,b,a: integer; begin for p:=1 to 9 do for l:=0 to 9 do for o:=0 to 9 do for m:=0 to 9 do for b:=0 to 9 do for a:=1 to 9 do if 5*(100000*p+10000*l+1000*o+100*m+10*b+a)= 100000*a+10000*p+1000*l+100*o+10*m+b then writeln(p,l,o,m,b,a,'*5=',a,p,l,o,m,b) end.