LearnPy Hub
← Operators problems
Hard

Digits by Arithmetic

Read a 4-digit number. Using only // and %, print the sum of its digits, the product of its digits and the number with its first and last digits swapped (as an integer).

Input

One 4-digit integer.

Output

Three lines.

Sample 1

Input
1234
Output
10
24
4231

Sample 2

Input
5070
Output
12
0
75
solution.py
Output appears here
Digits by Arithmetic · Python practice problem · LearnPy Hub