Number of Beautiful Integers in the Range
Count beautiful integers up to each bound with a digit DP over the even-minus-odd digit difference and the remainder mod k, then subtract.
Count beautiful integers up to each bound with a digit DP over the even-minus-odd digit difference and the remainder mod k, then subtract.