Program a10;
var a,b:Array [1..100,1..100] of integer;
k,i,n,j,s:integer;
Begin
read(n);
For i:=1 to n do
begin
For j:=1 to n do
read(a[i,j]);
end;
i:=0;j:=0;s:=0;k:=0;
while i<=n do
i:=i+1;j:=j+1;
if(a[i,j]>0)then k:=k+1;
s:=s+a[i,j];
writeln(k,' ',s);
end.
2)
var a,b:Array [1..100,1..100] of real;
k,i,n,m,j:integer;
s:real;
read(n,m);
For j:=1 to m do
k:=0;
for j:=1 to m do
s:=0;
for i:=1 to n do
if(a[i,j]>(s-a[i,j]))then k:=k+1;
writeln(k);
using System;
using System.Collections.Generic;
using System.Linq;
namespace Help
{
class MainClass
{
public static void Main(string[] args)
{
int day = 1;
double mass = 50;
double changing = 1.2;
while(mass < 120)
{
mass *= changing;
day++;
}
Console.WriteLine($"В {day} день");
}
}
}
Program a10;
var a,b:Array [1..100,1..100] of integer;
k,i,n,j,s:integer;
Begin
read(n);
For i:=1 to n do
begin
For j:=1 to n do
begin
read(a[i,j]);
end;
end;
i:=0;j:=0;s:=0;k:=0;
while i<=n do
begin
i:=i+1;j:=j+1;
if(a[i,j]>0)then k:=k+1;
s:=s+a[i,j];
end;
writeln(k,' ',s);
end.
2)
Program a10;
var a,b:Array [1..100,1..100] of real;
k,i,n,m,j:integer;
s:real;
Begin
read(n,m);
For i:=1 to n do
begin
For j:=1 to m do
begin
read(a[i,j]);
end;
end;
k:=0;
for j:=1 to m do
begin
s:=0;
for i:=1 to n do
begin
s:=s+a[i,j];
end;
for i:=1 to n do
begin
if(a[i,j]>(s-a[i,j]))then k:=k+1;
end;
end;
writeln(k);
end.