给定一列非负整数,求这些数连接起来的最大的数

“## 【Test】给定一列非负整数,求这些数连接起来的最大的数”

package Prac_Input;

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

public class Input_0927 {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	Scanner sc = new Scanner(System.in);
	String num = sc.nextLine();
	int nu = Integer.parseInt(num);
	String[] temp = new String[nu];
	int[] test = new int[nu];
	int medi = 0;
	String ss = " ";
	
	for(int i = 0; i < nu ;i ++){
		temp[i] = sc.nextLine();
	}
	
	medi = Integer.parseInt(temp[0]);
	System.out.println(medi);
	for(int i = 0; i< nu;i++){
		for(int j = 0; j < nu; j++){
			if(Integer.parseInt(temp[i].substring(0,1))=0;i--){
		System.out.print(temp[i]);
	}
	
}

}



你可能感兴趣的:(练习)