#include<bits/stdc++.h>
using namespace std;
int main()
{
int n, m, i, j, f, c;
while(cin >> n >> m)
{
int a[n][m];
f = c = 0;
for(i=0; i<n; i++)
{
f = 0;
for(j=0; j<m; j++)
{
cin >> a[i][j];
if(a[i][j] == 0)
f = 1;
}
if(f == 0)
c++;
}
cout << c << endl;
}
return 0;
}
using namespace std;
int main()
{
int n, m, i, j, f, c;
while(cin >> n >> m)
{
int a[n][m];
f = c = 0;
for(i=0; i<n; i++)
{
f = 0;
for(j=0; j<m; j++)
{
cin >> a[i][j];
if(a[i][j] == 0)
f = 1;
}
if(f == 0)
c++;
}
cout << c << endl;
}
return 0;
}
Comments
Post a Comment