[USACO 2014 Ope S]Odometer(silver)
题号:NC24598
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Farmer John's cows are on a road trip! The odometer on their car
displays an integer mileage value, starting at X (100 <= X <= 10^18)
miles at the beginning of their trip and ending at Y (X <= Y <= 10^18)
miles at the end of their trip. Whenever the odometer displays an
'interesting' number (including at the start and end of the trip) the
cows will moo. A number is 'interesting' if when you look at all its
digits except for leading zeros, at least half of these should be the
same. For example, the numbers 3223 and 110 are interesting, while
the numbers 97791 and 123 are not.

Help FJ count how many times the cows will moo during the trip.

输入描述:

* Line 1: The first line will contain two integers, X and Y, separated
by a space.

输出描述:

* Line 1: A single integer containing how many times the cows will moo
during the trip.
示例1

输入

复制
110 133

输出

复制
14