Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.144 s | 13 KBi |
#2 |
Incorrecto
|
0.147 s | 12 KBi |
#3 |
Incorrecto
|
0.204 s | 15 KBi |
#4 |
Incorrecto
|
0.283 s | 14 KBi |
#5 |
Incorrecto
|
0.147 s | 14 KBi |
#6 |
Incorrecto
|
0.155 s | 12 KBi |
#7 |
Incorrecto
|
0.148 s | 14 KBi |
#8 |
Incorrecto
|
0.28 s | 14 KBi |
#9 |
Incorrecto
|
0.175 s | 12 KBi |
#10 |
Incorrecto
|
0.18 s | 14 KBi |
import 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++; } if (v[i] > 1) { cont2++; } if (v[i] > 4) { cont3++; } } System.out.println(cont1); System.out.println(cont2); System.out.println(cont3); } }