Digit Sum - MarisaOJ: Marisa Online Judge

Digit Sum

Time limit: 1000 ms
Memory limit: 256 MB
Let's denote the function $f(x)$ which takes non-negative integers $x$ as input as the sum of digits of $x$. Calculate: $$ \sum_{i = L}^{R}f(i) $$ ### Input - A single line contains 2 integers $L,R$. ### Output - Print the result. ### Constraints - $0 \le L\le R \le 10^{12}$. ### Example Input: ``` 9 11 ``` Output: ``` 12 ```