Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#2 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#3 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#4 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#5 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#6 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#7 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#8 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#9 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
||
#10 |
Error de compilación
Main.java:1: error: class, interface, or enum expected mport java.util.Scanner; ^ 1 error |
mport java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int tamano = sc.nextInt(); int cont1 = 0; int cont2 = 0; int cont3 = 0; int[] v = new int[tamano]; for (int i = 0; i < v.length; i++) { v[i] = sc.nextInt(); } for (int i = 0; i < v.length; i++) { if (v[i] > 0) { cont1++; } } System.out.println(cont1); for (int i = 0; i < v.length; i++) { if (v[i] > 1) { cont2++; } } System.out.println(cont2); for (int i = 0; i < v.length; i++) { if (v[i] > 4) { cont3++; } } System.out.println(cont3); } }