1028 按长度排序


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

有一些整数,它的结构是:第一行为一个整数N,表示后面有N个整数(整数位数可能有好几十位)需要排序输出,先按长度排,如长度一样则按大小排,若遇到N等于零,则运行结束。

Sample

Input

3
123
12
3333
2
1000000000000000
1
0

Output

12
123
3333

1
1000000000000000

Comments

There are no comments at the moment.