begin
var a := MatrRandom(3, 3, -99, 99);
a.Println(4);
Writeln(4 * a.ColCount * '-');
a.ElementsWithIndexes.Where(t -> t[1] = t[2]).Sum(t -> t[0]).Println
end.
begin
var a := MatrRandom(3, 3, -99, 99);
a.Println(4);
Writeln(4 * a.ColCount * '-');
a.ElementsWithIndexes.Where(t -> t[1] = t[2]).Sum(t -> t[0]).Println
end.