-->
当前位置:首页 > 题库

PROGRAMMING:Group a minimum number

Luz5年前 (2021-05-10)题库518
Given a number of numbers 0-9. You can arrange the numbers in any order, but you must use them all. The goal is to make the final number as small as possible. For example: given two zeros, two 1s, three 5S, and an 8, the minimum number we get is 10015558.
Now given the number, please write a program to output the minimum number that can be composed.
###Input format:
Input 10 non negative integers in one line, indicating the number of digits 0, 1,... 9. Integers are separated by a space. The total number of 10 digits is not more than 50, and at least 1 digit is not zero.
###Output format:
Output the smallest number that can be made up in a row.
###Input example:
```in
2 2 0 0 0 3 0 0 1 0
```
###Output example:
```out
ten million fifteen thousand five hundred and fifty-eight
```






answer:If there is no answer, please comment