Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import static java.lang.Math.*;
- public class Main {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt(), ans = 0;
- for (int i = 0; i < n; i++)
- {
- int x = sc.nextInt();
- if (x > 0)
- ans++;
- }
- System.out.println(ans);
- }
- }
Add Comment
Please, Sign In to add comment