.


- 4


56. , 7 .

57. 7 3; 72 44; 73

111. .

58. a a2 + a + 1589 ?

59. 16p.

60. , 468, 42.

1

Program

Task1;

uses WinCrt;

var

n, f, i, s : longint;

begin

write(' '); readln(n);

s := 0; f := 1;

for i := 1 to n do

begin

f := f*i; s := s + f

end;

writeln(' 1 ', n, ' ', s)

end.

 

4

 

Program Task4;

uses WinCrt;

var

t, s, d, e : integer;

begin

writeln(' ');

for t := 1 to 9 do

for s := 0 to 9 do if s <> t then

for d := 0 to 9 do if (d <> s) and (d <> t) then

for e := 0 to 9 do

if (e <> d) and (e <> s) and

(e <> t) then

if (t*1000 + s*100 + d*10 + e)*9 = t*10000 + s*100 + d*10 + e

then writeln(t*1000 + s*100 + d*10 + e)

end.

 

6

 

Program Task6;

uses WinCrt;

var

x, y, z, n, k, p : longint;

begin

write(' '); readln(n);

k := 0; x := 1;

while x*x + 2<=n do

begin

k := k + 1; x := x + 1

end;

p := 0;

for x := 1 to k do

for y := 1 to x do

for z := 1 to y do

if x*x + y*y + z*z=n

then

begin

p := p + 1;

writeln(x, '*', x, '+', y, '*', y, '+', z, '*', z, '=', n)