Bruce always comes up with new challenges for his students. On Saturday's class, Bruce gives Timothy two positive integers and
, and asks Timothy to calculate the
mod
, where
is the concatenation of all positive integers from
to
. For example,
. Timothy is so smart that he immediately realizes that it is impossible to calculate the result by hand. Can you help Timothy to write a program to solve this question?
Input Specification
The input will consist of two integers, and
, in one line.
In of the test cases,
.
In of the test cases,
and
.
Output Specification
Output one integer, the result of .
Sample Input 1
13 13
Sample Output 1
4
Sample Input 2
12345678910 1000000000
Sample Output 2
345678910
Comments