var
a,b,i,s:integer;
readln(a);
readln(b);
for i=100 to 999 do
begin
if (i mod 10)+(i div 100)+((i mod 100) div 10)=a then
if i mod b = 0 then
writeln(i);
end;
end.
uses crt;
var a,b,i,s:integer;
clrscr;
writeln ('введите a');readln(a);
writeln ('введите b');
readln(b);for i=100 to 999 do beginif (i mod 10)+(i div 100)+((i mod 100) div 10)=a thenbeginif i mod b = 0 thenwriteln(i);end;end;end.
var
a,b,i,s:integer;
readln(a);
readln(b);
for i=100 to 999 do
begin
if (i mod 10)+(i div 100)+((i mod 100) div 10)=a then
begin
if i mod b = 0 then
writeln(i);
end;
end;
end.
uses crt;
var a,b,i,s:integer;
begin
clrscr;
writeln ('введите a');
readln(a);
writeln ('введите b');
readln(b);
for i=100 to 999 do
begin
if (i mod 10)+(i div 100)+((i mod 100) div 10)=a then
begin
if i mod b = 0 then
writeln(i);
end;
end;
end.