8126+8126=16252
паскаль:
uses crt;
var u,d,a,r,k: byte;
begin
for u:=1 to 9 do
for d:=0 to 9 do
for a:=0 to 9 do
for r:=0 to 9 do
for k:=0 to 9 do
if (u*1000)+(d*100)+(a*10)+r+(u*1000)+(d*100)+(a*10)+r=(d*10000)+(r*1000)+(a*100)+(k*10)+a
then
writeln('u=',u);
writeln('d=',d);
writeln('a=',a);
writeln('r=',r);
writeln('k=',k);
writeln(u,d,a,r,'+',u,d,a,r,'=',d,r,a,k,a);
end;
end.
8126+8126=16252
паскаль:
uses crt;
var u,d,a,r,k: byte;
begin
for u:=1 to 9 do
for d:=0 to 9 do
for a:=0 to 9 do
for r:=0 to 9 do
for k:=0 to 9 do
if (u*1000)+(d*100)+(a*10)+r+(u*1000)+(d*100)+(a*10)+r=(d*10000)+(r*1000)+(a*100)+(k*10)+a
then
begin
writeln('u=',u);
writeln('d=',d);
writeln('a=',a);
writeln('r=',r);
writeln('k=',k);
writeln(u,d,a,r,'+',u,d,a,r,'=',d,r,a,k,a);
end;
end.