-
Notifications
You must be signed in to change notification settings - Fork 0
/
_12798.java
33 lines (26 loc) · 846 Bytes
/
_12798.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package io.github.tahanima.contestvolumes.volume127;
import java.util.Scanner;
/**
* @author tahanima
* @since 05/13/2021
* @see <a href="https://onlinejudge.org/external/127/12798.pdf">Problem Statement</a>
*/
public class _12798 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNextInt()) {
int n = input.nextInt(), m = input.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
boolean hasScoredInAll = true;
for (int j = 0; j < m; j++) {
int goal = input.nextInt();
hasScoredInAll &= (goal > 0);
}
if (hasScoredInAll)
count++;
}
System.out.println(count);
}
}
}