.


- 2


,

.

.

.

3. .

.

Program Problem5;

uses WinCrt;

var

n, m, k, a, p, s : integer;

begin

write(' , ');

write(' '); readln(n);

writeln(' , ');

write(' . . . '); readln(m);

write(' : ');

k := 1;

while k <= n do

begin

s := 0; a := k;

while k <> 0 do

begin

p := k mod 10;

s := s + p;

k := k div 10

end;

if sqr(s) = m then write(a, ' ');

k := a + 1

end

end.

. - , , - , .