Implement a function to count the number of Hamming numbers within a specified inclusive range. A Hamming number is a positive integer that can be expressed as 2^i * 3^j * 5^k, where i, j, and k are non-negative integers.
Input/Output Requirements
Function Signature:
python
def count_hamming_numbers(m: int, n: int) -> int:
Inputs:
An integer m (1 ≤ m ≤ 1,000,000) representing the lower bound of the range.
An integer n (m ≤ n ≤ 1,000,000) representing the upper bound of the range.
Output:
Returns an integer representing the count of Hamming numbers within the range [m, n].
Implementation Instructions
Create a file named /app/solution.py.
Implement the count_hamming_numbers function as described in the function signature and functionality.
Ensure the function generates all Hamming numbers up to 1,000,000.
Use the bisect module to efficiently count how many of these Hamming numbers are within the specified range [m, n].
Make sure to handle edge cases such as when m equals n.
Example
python
# Example usage:
result = count_hamming_numbers(1, 30)
print(result) # Expected output: the number of Hamming numbers between 1 and 30