题目描述
So, here you are finally competing for the title of the champion of C3W. But before you go any further we've got something for you. It's not at all difficult if you're meant to be the guy who takes it all.
Given are some numbers against which a number has been calculated as it's output. identify the logic behind it and move further.
2 => 1
13 => 3
71 => 4
55 => 5
111 => 6
Input format:
An integer t, 1 ≤ t ≤ 100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1 ≤ n ≤ 10^9.
Output format:
For each integer given as input, output the required answer as a single integer.
SAMPLE INPUT
5
2
13
71
55
111
SAMPLE OUTPUT
1
3
4
5
6
输入格式
见题面
输出格式
见题面
样例输入
7
1
99999999
656464
4234234
67867867
23423
153531
样例输出
4
6
9
7
6