~/algor $ cat problems/while-eng-katta-va-eng-kichik-raqam
Largest and smallest digit
Easy
1000 ms
64 MB
33%
A positive integer $n$ is given. Find the largest and the smallest of its digits.
Input
One positive integer $n$.
Output
One line with two integers separated by a space: the largest and the smallest digit.
Note
$1 \le n \le 10^{18}$
Examples
Input #1
30528
Output #1
8 0
Input #2
777
Output #2
7 7