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

Задача 37591. The most difficult question for beginners, or the digits of a number


Задача

Темы: Целые числа
Enter a three-digit number from the keyboard. 
Write a program that prints space separated on one line:
the sum of the digits of the number and the new number formed by permuting ones and tens.

An example of input and output data.
Input Output
365 14 356