eolymp
bolt
Try our new interface for solving problems
Problems

The minimal sum of digits

The minimal sum of digits

How many positive integers from interval $[m, n]$ have the least sum of digits? \InputFile Two integers $m$ and $n~(1 \le m \le n \le 10^6)$. \OutputFile Print the amount of positive integers from interval $[m, n]$ with minimum sum of digits.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1 100
Output example #1
3