// Template v2 #define pb push_back #define mp make_pair #define first x #define second y #define l(x) x<<1 #define r(x) x<<1 | 1 #define lsb(x) x & -x #include #include using namespace std; typedef long long LL; typedef long double LD; typedef vector VI; typedef pair PII; typedef pair PLL; typedef pair PKK; // primes less than 100 const int PRIM[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}; const int CMAX = 10005; const int MOD = 700001; const int NMAX = 1e5 + 69; const short INF16 = 32000; const int INF = 2*1e9 + 6661369; const LL INF64 = LL(1e18); const LD EPS = 1e-9, PI = acos(-1.0); int x,y; LL a[15]; LL query(LL n) { // base case: if n<10 return sum of // first n natural numbers if (n<=10) { if(n==-1) return 0; if(n==0) return 0; if(n==1) return 1; if(n==2) return 1; if(n==3) return 4; if(n==4) return 4; if(n==5) return 9; if(n==6) return 9; if(n==7) return 16; if(n==8) return 16; if(n==9) return 25; if(n==10) return 25; } // d = number of digits minus one in n. For 328, d is 2 LL d = log10(n); LL p = ceil(pow(10, d)); LL msd = n/p; return msd*a[d] + (msd*(msd-1)/2)*p/2 + msd*(1+n%p)/2 + query(n%p); } void read() { a[0] = 0, a[1] = 25; for (int i=2; i<=10; i++) a[i] = a[i-1]*10 + 45*ceil(pow(10,i-1))/2; cin>>x>>y; if(y%2==0) y--; if(x%2==0) x++; cout<