BETA

Difficulty Level: Easy

Total Submissions: 284 Accuracy:

44.01%

Total digits
     

Given a number n, count the total number of digits required to write all numbers from 1 to n.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer n.

Output:
Print the total number of digits required to write all numbers from 1 to n.

Constraints:
1<=T<=10^5
1<=n<=10^5

Example:
Input:

2
13
4

Output:
17
4

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.