Problem:
Sorting Three Numbers

Write a program which reads three integers, and prints them in ascending order.

Input

Three integers separated by a single space are given in a line.

Output

Print the given integers in ascending order in a line. Put a single space between two integers.

Constraints

1 ≤ the three integers ≤ 10000

Sample Input 1

3 8 1

Sample Output 1

1 3 8

Solution in JAVA (judge verdict: Wrong Answer)

import java.util.Arrays;
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		int[] numbers;
		Scanner scanner = new Scanner(System.in);
		String num = scanner.nextLine();
		if (!"".equals(num.trim())) {			
			String[] input = num.split(" ");
			int num1 = (Integer.parseInt(input[0]));
			int num2 = (Integer.parseInt(input[1]));
			int num3 = (Integer.parseInt(input[2]));
			if(num1 >0 && num1 <10001 && num2 >0 && num2 <10001 && num3 >0 && num3 <10001 ) {
			numbers = new int[input.length];
			for(int i = 0; i< input.length; i++) {				
				numbers[i] = Integer.parseInt(input[i]);
			}
			Arrays.sort(numbers);
			System.out.println(Arrays.toString(numbers));
			}
		}		
	}
}