report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
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 ```
Digit DP
Unlucky number
Digit Sum
Divisible
Prime digit sum
Non-palindrome number
Yet another XOR problem
Taboo substring
Balanced number
Equation
Beautiful number
Constructing numbers
Topic
Dynamic Programming
Rating 1400
Solution (0) Solution