Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234510.args |
||
#2 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234510.args |
||
#3 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234702.args |
||
#4 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234514.args |
||
#5 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234514.args |
||
#6 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234510.args |
||
#7 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234511.args |
||
#8 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234701.args |
||
#9 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234513.args |
||
#10 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234512.args |
||
#11 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234510.args |
||
#12 |
Error de compilación
Main.java:10: error: int cannot be dereferenced String[] numbers = numero2.split(" "); ^ Main.java:14: error: incompatible types: int cannot be converted to String for (int i=0; i < Integer.parseInt(numero1); i++){ ^ Main.java:15: error: incompatible types: int cannot be converted to String for (int j=0; j < Integer.parseInt(numero1); j++){ ^ Main.java:29: 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_234510.args |
import java.util.Scanner; 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"); } }