Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class A231 {
  4.  
  5. public static void main(String[] args) {
  6. Scanner scanner = new Scanner(System.in);
  7. int n = scanner.nextInt();
  8. int count = 0;
  9. int result = 0;
  10. for (int i = 0; i < n; i++) {
  11. for (int j = 0; j < 3; j++) {
  12. int a = scanner.nextInt();
  13. if(a > 0) {
  14. count++;
  15. }
  16. }
  17. if (count >= 2) {
  18. result++;
  19. }
  20. count = 0;
  21. }
  22. System.out.println(result);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement