Range Digit Sum

Sum the decimal digits of every integer from L to U, inclusive, where U can reach two billion.

Medium5MathDynamic programmingImplementationNo attempts yetTime limit2sMemory limit128 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