题解 | #图片整理#
图片整理
http://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
String str = sc.next();
char[] ch = str.toCharArray();
for(int i = 0; i < ch.length - 1; i++){
char temp;
for(int j = i; j < ch.length; j++){
if(ch[i] == ch[j]){
continue;
}
if(ch[i] > ch[j]){
temp = ch[i];
ch[i] = ch[j];
ch[j] = temp;
}
}
}
System.out.println(String.valueOf(ch));
}
}
}