program test;
var i,a,b:integer;
BEGIN
writeln('Enter a:');
readln(a);
writeln('Enter b:');
readln(b);
for i:=100 to 999 do
begin
if i div 10) mod 10)+(i div 100)+(i mod 10) )= a) and (i mod b=0) then writeln(i);
end;
END.
program test;
var i,a,b:integer;
BEGIN
writeln('Enter a:');
readln(a);
writeln('Enter b:');
readln(b);
for i:=100 to 999 do
begin
if i div 10) mod 10)+(i div 100)+(i mod 10) )= a) and (i mod b=0) then writeln(i);
end;
END.