为啥Java一直MLE
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int [] tong = new int[n+1];
for (short i = 0; i < m; i++) {
tong[sc.nextInt()]++;
}
for (short i = 0; i < n+1; i++) {
while (tong[i]-- > 0) {
System.out.print(i+" ");
}
}
}
}