Var a: array [1..100,1..100] of integer; var i,j,m,n: integer; var poz1,poz2: integer; begin read(n,m); for i := 1 to n do for j := 1 to m do read(a[i,j]); for i := 1 to n do for j := 1 to m do if ( a[i,j]>0) then begin poz1:=i ; poz2:=j; end; writeln('poslenyi ', a[poz1,poz2]); writeln('index',poz1,' ; ',poz2); end.
var i,j,m,n: integer;
var poz1,poz2: integer;
begin
read(n,m);
for i := 1 to n do
for j := 1 to m do
read(a[i,j]);
for i := 1 to n do
for j := 1 to m do
if ( a[i,j]>0) then begin
poz1:=i ; poz2:=j;
end;
writeln('poslenyi ', a[poz1,poz2]);
writeln('index',poz1,' ; ',poz2);
end.