#000095

Big Digits

You are given two integers A i B (0 <= A <= B <= 10<sup>18</sup>). You have to find out how many integers from the interval [ A, B ] have the sum of all its digits to be equal to some given integer S.


InputYou should read the input from the standard input. In one line you are given two integers A, B (0 <= A <= B <= 10^18) i S (0 <= S <= 191) separated by a space.

OutputTo the standard output, output one integer representing the number of integers from the interval [ A, B ] whose sum of all digits equals to S.

Input:
1 100 8
Output:
9


Input:
5551 987654 25
Output:
53055

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.