cho.sh
Notes
Loading...

Range Digit Sum

Time limit

2s

Memory limit

128 MB

Problem

Given two integers L and U, compute the sum of the digits of every integer from L through U, inclusive, and output the total.

Input

The first line contains two integers L and U separated by a space.

Output

Print the total sum of digits over all integers from L through U, inclusive.

Constraints

  • 0 <= L <= U <= 2,000,000,000