Smallest number
Time limit5sMemory limit1024 MB
Given three digits, arrange them into the smallest three-digit number that does not start with a zero.
- Level
Easy1 of 10
- Topics
- Sorting, Implementation
- Solved
- No attempts yet
Problem
Three digits , , and are given (they need not be distinct). Arrange them in a sequence to form the smallest possible three-digit number. The number cannot have a leading zero.
Input
The first and only line contains three non-negative integers , , and (), at least one of which is positive.
Output
Print the smallest three-digit number (without leading zeros) that can be formed by arranging the digits from the input.