Java Bài 12.A7: Sắp xếp kí tự.


LÀM BÀI

Points: 10 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Cho xâu kí tự S, tiến hành sắp xếp kí tự trong xâu S theo thứ tự giảm dần, tăng dần theo thứ tự từ điển rồi in ra màn hình.

Input Format

Dòng duy nhất chứa xâu S không quá 1000 kí tự.

Constraints

.

Output Format

Dòng 1 in ra xâu S sau khi sắp giảm dần. Dòng 2 in ra xâu S sau khi sắp tăng dần.

Ví dụ:

Dữ liệu vào
asdfuytawf4676810
Dữ liệu ra
ywutsffdaa8766410
0146678aadffstuwy

Comments

There are no comments at the moment.

Zalo