Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/while-raqamlar-yigindisi-va-soni

Sum and count of digits

Easy 1000 ms 64 MB 29%
Share

A positive integer $n$ is given. Compute the number of its digits and the sum of its digits.

Counting the digits of a number and adding them up

Input

One integer $n$.

Output

One line with two integers separated by a space: the number of digits and the sum of digits.

Note

$1 \le n \le 2 * 10^{9}$

Examples

Input #1
1234
Output #1
4 10
Input #2
508
Output #2
3 13

Sign in to submit a solution

Signing up is free and takes a minute.