1)program gt;
var a:array[1..100,1..100]of integer;
b:array[1..100]of integer;
n,m,s,i,j:integer;
begin
readln(n,m);
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
for j:=1 to m do
begin
s:=0;
for i:=1 to n do
s:=s+a[i,j];
b[j]:=s;
end;
for i:=1 to m do
write(b[i],' ');
end.
2)
program gt;
var a:array[1..100,1..100]of integer;
n,m,s,i,j:integer;
begin
readln(n,m);
randomize;
for i:=1 to n do
begin
for j:=1 to m do
begin
if(i mod 2=0)then a[i,j]:=0 else a[i,j]:=random(100);
write(a[i,j],' ');
writeln;
end;
end.