Difference of numbers
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given four digits, your task is to form the largest and smallest possible numbers using these digits, and then calculate the difference between them.
Input
You will receive four lines of input, each containing a single digit.
Output
Output the difference between the largest and smallest numbers that can be created using the provided digits.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 43%