Contar unos en una matriz 2D
Crea una función para contar cuántos valores de una matriz bidimensional son exactamente iguales a 1.
Ejemplos
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