#61Easy
Number and sum of digits
Time: 1 s · Memory: 256 MB
- Working with numbers
Statement
You are given a natural number . Find how many digits it has and the sum of its digits.
Input format
A single integer ().
Output format
A single line with two numbers: the number of digits and the sum of the digits.
Examples
Input
1562
Output
4 14
Input
7
Output
1 7
Note
The last digit is ; dropping it is integer division of by . Repeat until becomes zero (while). In the first example has digits and .
Numbers up to need long long in C++ and int64 in Go.
