Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#2 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#3 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#4 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#5 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#6 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#7 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#8 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#9 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#10 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#11 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
||
#12 |
Error de compilación
Main.java:1: error: class, interface, or enum expected java.util.Scanner ^ Main.java:3: error: ';' expected public static void main(String[] args) ^ Main.java:7: error: illegal start of type for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: > expected for(int i =0;i< a.length ;i++){ ^ Main.java:7: error: <identifier> expected for(int i =0;i< a.length ;i++){ ^ Main.java:10: error: illegal start of type for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: > expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:10: error: <identifier> expected for (int i = 0; i < a.length - 1; i++) { ^ Main.java:13: error: ';' expected else{System.out.print("Ordenado")} ^ 9 errors |
java.util.Scanner public class Main{ public static void main(String[] args) Scanner SC = new Scanner(System.in); int [] a =new int[SC.nextInt()]; for(int i =0;i< a.length ;i++){ a[i]=SC.nextInt(); } for (int i = 0; i < a.length - 1; i++) { if (arreglo[i] > arreglo[i + 1]){ System.out.print("Desordenado");} else{System.out.print("Ordenado")} } }