“## 【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))<Integer.parseInt(temp[j].substring(0,1))){
ss = temp[i];
temp[i] = temp[j];
temp[j] = ss;
}
}
}
for(int i = nu -1; i>=0;i--){
System.out.print(temp[i]);
}
}
}