Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class A231 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = scanner.nextInt();
- int count = 0;
- int result = 0;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < 3; j++) {
- int a = scanner.nextInt();
- if(a > 0) {
- count++;
- }
- }
- if (count >= 2) {
- result++;
- }
- count = 0;
- }
- System.out.println(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement