broj
시간 제한: 150ms메모리 제한: 128MB출처: CHC 2004 Regional Competition - JuniorsBOJ 1748
문제
A sequence of digits is obtained by writing down decimal representations of all integers starting with 1 and continuing up to a certain number N consecutively like this:
12345678910111213141516171819202122 ... etc.
Write a program that will compute the number of digits in such a sequence.
입력
The first and only line of input contains an integer N, 1 ≤ N ≤ 100,000,000.
출력
The first and only line of output should contain the number of digits in a sequence determined by the number given in the input.
예제
예제 1
입력
5
출력
5
예제 2
입력
15
출력
21
예제 3
입력
120
출력
252
코드를 제출하려면 로그인하세요.