Олимпиадный тренинг

Задача 24682. Analysis of the digits of a number - 5


Задача

Темы: Цикл while
Given a natural number N (N<=109). Find the sum of its maximum and minimum digits

Input and output example
test number Input Output
1 45545 9
2 111 2