How much do I have to write? Writing out numbers is among the Hello worlds of programming, often the numbers 1-10.
I want to write out many numbers! Many, Many numbers. But how many numbers do I have to write?
Task
Given an integer input, give a number as output that would give me the number of digits that would be in a string containing all integer numbers in the range from 0 to the input, inclusive. The negation identifier (&quot;-&quot;) counts as a single character.
Example I/Os
Input: 8
Written out: 0,1,2,3,4,5,6,7,8
Output: 9
Input: 101
written out: 0,1,2,3....,99,100,101
Output: 196
Input: 102
written out: 0,1,2,3....,100,101,102
output: 199
Input -10
Written out: 0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10
output: 22
This is a code-golf. The lowest number of bytes wins!
05AB1E, 3 bytes

Code:

ÝJg


Uses the CP-1252 encoding. Try it online!

Explanation:

Ý     # Range [0 .. input]
 J    # Join into one string
  g   # Get the length of the string