Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234750.args |
||
#2 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
||
#3 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234557.args |
||
#4 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234750.args |
||
#5 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
||
#6 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234749.args |
||
#7 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
||
#8 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
||
#9 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
||
#10 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234559.args |
||
#11 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234601.args |
||
#12 |
Error de compilación
Main.java:11: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:16: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:30: error: int cannot be dereferenced System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors printing javac parameters to: /box/javac.20210529_234558.args |
import java.util.*; public class Main { public static void main(String[] args) { int numero1, numero2; Scanner numeros = new Scanner(System.in); numero1 = numeros.nextInt(); numero2 = numeros.nextInt(); String[] numbers = numero2.split(" "); String temp; for (int i=0; i < Integer.parseInt(numero1); i++){ for (int j=0; j < Integer.parseInt(numero1); j++){ if(Integer.parseInt(numbers[j]) > Integer.parseInt(numbers[i])){ temp = numbers[i]; numbers[i] = numbers[j]; numbers[j] = temp; } } } String valores=""; for(int k=0;k < numbers.length; k++){ valores+=numbers[k] + " "; } System.out.println((numero2.equals(valores.trim()))?"Ordernado":"Desordenado"); } }