P14968 [HackerEarth] Tony is an employee at a mall. His job is to label each vehicle entering into the parking with a unique number. He starts labelling the car with 1 , 2 ,3…. N (First car with number 1, Se
普及
题目描述

Tony is an employee at a mall. His job is to label each vehicle entering into the parking with a unique number. He starts labelling the car with 1 , 2 ,3…. N (First car with number 1, Second car with number 2 and so on).

Tony wants to know how many digits he will have to write down in a day as he labels the arriving N cars.
Input:
First line contains T, the number of test cases to follow. (1 ≤ T ≤ 1000)
Each test case contains a integer n (1 ≤ n<10^12) denoting number of cars in a day.

Output:
For each test case print number of digits required to label the n cars.

SAMPLE INPUT
2
13
4

SAMPLE OUTPUT
17
4

Explanation

Sample

input
13
output
17
input
4
output
4

Explanation:
Note to the first test. The cars get numbers 1,2,3,4,5,6,7,8,9,10,11,12,13, which totals to 17 digits.
Note to the second sample. The cars get numbers 1,2,3,4, which totals to 4 digits.

输入格式

见题面

输出格式

见题面

样例输入
10 1 7 90 91111 99000 89999 99001 99210 11555 11556
样例输出
1 7 171 444449 483894 438889 483899 484944 46669 46674