Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#2 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#3 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#4 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#5 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#6 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#7 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#8 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#9 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
||
#10 |
Error de compilación
Main.java:9: error: cannot find symbol elementos[i] = scan.nextnt(); ^ symbol: method nextnt() location: variable scan of type Scanner Main.java:19: error: cannot find symbol System.out.prinln(veces); ^ symbol: method prinln(int) location: variable out of type PrintStream 2 errors |
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] elementos = new int[n]; for(int i=0; i<n; i++){ elementos[i] = scan.nextnt(); } int nConsultas = scan.nextInt(); for(int i=1; i<=nConsultas; i++){ int numero = scan.nextInt(); int veces = 0; for(int j: elementos){ if(j>numero) veces++; } System.out.prinln(veces); } } }