1538: 四个一位数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:73 Solved:30

Description

依次输入4个1位数,无重复得组合成最大的四位数和最小的四位数,并计算最大数与最小数的差。

Output

最大数
最小数

Sample Input Copy

2 3 4 5

Sample Output Copy

5432
2345
3087