Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.376 s | 14 KBi |
#2 |
Incorrecto
|
0.315 s | 13 KBi |
#3 |
Incorrecto
|
0.142 s | 13 KBi |
#4 |
Incorrecto
|
0.13 s | 14 KBi |
#5 |
Incorrecto
|
0.399 s | 14 KBi |
#6 |
Incorrecto
|
0.147 s | 14 KBi |
#7 |
Incorrecto
|
0.373 s | 14 KBi |
#8 |
Incorrecto
|
0.15 s | 13 KBi |
#9 |
Incorrecto
|
0.389 s | 14 KBi |
#10 |
Incorrecto
|
0.144 s | 13 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++; }else{ cont1--; } } System.out.println(cont1); for (int i = 0; i < v.length; i++) { if (v[i] > 1) { cont2++; }else{ cont2--; } } System.out.println(cont2); for (int i = 0; i < v.length; i++) { if (v[i] > 4) { cont3++; }else{ cont3--; } } System.out.println(cont3); } }