package no319; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); System.out.println(count1(b) - count1(a-1) + count2(b) - count2(a)); } //0 ~ n の数で12を含むものの数 public static long count1(long x) { char[] s = String.valueOf(x).toCharArray(); int n = s.length; long[][][][] dp = new long[2][n][10][n+1]; dp[1][0][0][0] = 1; for(int i=0;i= 2) { ans++; } if (x >= 22) { ans++; } long y = 202; long powten = 10; while(x >= y) { ans += Math.min((x - y) / 10,powten - 1) + 1; y = y * 10 - 18; powten *= 10; } // System.out.println("c2:" + x + "," + ans); return ans; } }