706

5

 

Program zadacha_5;

type

mas=array [1..100] of integer;

var

n,m :word; { }

a,b :mas; { }

i :word; { }

s :integer;{ }

function max(c:mas;k:integer);

begin

max:=c[1];

for i:=1 to k do if c[i]>max then max:=c[i];

end;

begin

write(n=); readln(n);

for i:=1 to n do

begin

write(a[,i:3,]=); readln(a[i]);

end;

write(m=); readln(m);

for i:=1 to m do

begin

write(b[,i:3,]=); readln(b[i]);

end;

s:=1+sqr(max(a,n))+sqr(max(b,m));

writeln( =, s:10);

end.

 

n = 5

a [ 1 ] = 2

a [ 2 ] = -6

a [ 3 ] = 10

a [ 4 ] = -15

a [ 5 ] = 8

 

m = 6

b [ 1 ] = -3

b [ 2 ] = -100

b [ 3 ] = 25

b [ 4 ] = 13

b [ 5 ] = 7

b [ 6 ] = 1

= 725

 

 

 



:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
 
 
 
 
 
 

Warning: in_array() expects parameter 2 to be array, null given in /home/p198609/www/bestlogistics.ru/2f41c03c6df35aa46f8d897a4eed7d02/sape.php on line 192