----------这是我的代码----------------------
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
HashMap<Integer, String> hmap = new HashMap<>();
int T = sc.nextInt();
int aindex=0;
while (T>0&&T<=100)
{
T--;
int N=sc.nextInt();
int[] temp = new int[N];
for(int i=0;i<N&&N>=2&&N<=100;i++)
{
int re= sc.nextInt();
if(re>=1&&re<=Math.pow(10,8))
temp[i]=re;
else break;
}
process(temp);
for(int ii=0;ii<temp.length;ii++)
{ if(T>0)
{ if(ii==temp.length-1)
{
hmap.put(aindex++,temp[ii]+"\n");}
else hmap.put(aindex++,temp[ii]+" ");}
else hmap.put(aindex++,temp[ii]+" ");
}
}
Set<Integer> integers = hmap.keySet();
for(int key=0;key<integers.size();key++) {
if(key==integers.size()-1) System.out.print(hmap.get(key).trim());
else System.out.print(hmap.get(key));
}
}
public static void process(int arr[]){
for(int i=0;i<arr.length-1;i++)
for(int j=0;j<arr.length-1-i;j++)
{
if(arr[j]>arr[j+1])
swag(arr,j,j+1);
}
}
public static void swag(int []arr,int i,int j)
{
int t;
t= arr[i];
arr[i]=arr[j];
arr[j]=t;
}
}