NUMBERS FROM MATCHSTICKS
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Using a set number of matches and following specific templates to represent digits, you can form various natural multi-digit numbers. What are the smallest and largest numbers you can create using exactly K matches?
Input
A natural number K – representing the number of matches (2 ≤ K ≤ 200).
Output
Provide the smallest and largest numbers that can be constructed using all K matches.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 8%