Contar uns em uma matriz 2D
Crie uma função para contar quantos valores de uma matriz bidimensional são exatamente iguais a 1.
Exemplos
Program.CountOnes(new[] { new[] { 1, 0, 1 }, new[] { 0, 0, 0 }, new[] { 0, 0, 1 } }) ➞ 3
Program.CountOnes(new[] { new[] { 1, 2, 3 }, new[] { 0, 2, 1 }, new[] { 5, 7, 33 } }) ➞ 2