import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String A = sc.next();
char[] a = A.toCharArray();
for (int j = 0; j < a.length; j++) {
for (int i = 0; i < a.length - 1; i++) {
if (a[i] > a[i + 1]) {
char t = a[i];
a[i] = a[i + 1];
a[i + 1] = t;
}
}
}
for (int j = 0; j < 3; j++) {
System.out.print(a[j]);
if (j != 2) {
System.out.print(" ");
}
}
System.out.println();
}
}
}
杭电 2000 ( ASCII码排序 ) java
最新推荐文章于 2021-03-27 20:31:47 发布