A digit DP problem.Fix the first and last digit using loop and try to calculate how many numbers satisfy for A and B. Take the multiplication and add up to Answer.