Minimum and maximum digits
Problem
Given a positive integer N. Print its maximum digit in the first line, its minimum digit in the second line
Input: integer N > 0
Output: print two numbers, one per line
The first line contains the maximum digit of the number N
In the second line - the minimum digit of the number N
Examples
№ |
Input |
Output |
1 |
21345 |
5
1 |
Запрещенные операторы: list
; [
; find
; index