链接:https://ac.nowcoder.com/acm/contest/57361/M
来源:牛客网
Bandycar is writing page numbers forTTT books. The page numbers of all books start from 111. The iii-th book has nin_ini pages. Bandycar wants to know, for each book, how many digits does he need to write.
输入格式
The first line contains an integer TTT.
The iii-th line in the following TTT lines contains an integer nin_ini.
输出格式
Output TTT lines, the iii-th line contains the answer to the iii-th book.
输入样例
复制
2
15
1000
输出样例
复制
21
2893
数据范围与提示
For the first book, page 111 to 999 each has one digit; page 101010 to 151515 each has two digits. So the answer is 1×9+2×6=211\times9+2\times6=211×9+2×6=21.