from random import randint, random



def lowerCamelCase  (   SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE = False  ,			SCREAMING_SNAKE_CASE = False  ,			SCREAMING_SNAKE_CASE = 5  ,			):
    '''simple docstring'''







    __UpperCamelCase     :Optional[int]			  =		[[-1] * number_of_cells]  # Create a highway without any car
    __UpperCamelCase     :Optional[int]			  =		0
    __UpperCamelCase     :Any			  =		max(SCREAMING_SNAKE_CASE  ,			0	)
    while i < number_of_cells:
        __UpperCamelCase     :Union[str, Any]			  =		(
            randint(0  ,			SCREAMING_SNAKE_CASE	) if random_speed else initial_speed
        )  # Place the cars
        i += (
            randint(1  ,			max_speed * 2	) if random_frequency else frequency
        )  # Arbitrary number, may need tuning
    return highway



def lowerCamelCase  (   SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE	):
    '''simple docstring'''







    __UpperCamelCase     :Any			  =		0
    __UpperCamelCase     :Optional[int]			  =		highway_now[car_index + 1 :]
    for cell in range(len(SCREAMING_SNAKE_CASE	)	):  # May need a better name for this
        if cells[cell] != -1:  # If the cell is not empty then
            return distance  # we have the distance we wanted
        distance += 1
    # Here if the car is near the end of the highway
    return distance + get_distance(SCREAMING_SNAKE_CASE  ,			-1	)



def lowerCamelCase  (   SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE	):
    '''simple docstring'''







    __UpperCamelCase     :Optional[int]			  =		len(SCREAMING_SNAKE_CASE	)
    # Beforce calculations, the highway is empty
    __UpperCamelCase     :List[str]			  =		[-1] * number_of_cells

    for car_index in range(SCREAMING_SNAKE_CASE	):
        if highway_now[car_index] != -1:
            # Add 1 to the current speed of the car and cap the speed
            __UpperCamelCase     :Optional[int]			  =		min(highway_now[car_index] + 1  ,			SCREAMING_SNAKE_CASE	)
            # Number of empty cell before the next car
            __UpperCamelCase     :Dict			  =		get_distance(SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE	) - 1
            # We can't have the car causing an accident
            __UpperCamelCase     :Tuple			  =		min(next_highway[car_index]  ,			SCREAMING_SNAKE_CASE	)
            if random() < probability:
                # Randomly, a driver will slow down
                __UpperCamelCase     :Optional[Any]			  =		max(next_highway[car_index] - 1  ,			0	)
    return next_highway



def lowerCamelCase  (   SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE	):
    '''simple docstring'''







    __UpperCamelCase     :Union[str, Any]			  =		len(highway[0]	)

    for i in range(SCREAMING_SNAKE_CASE	):
        __UpperCamelCase     :int			  =		update(highway[i]  ,			SCREAMING_SNAKE_CASE  ,			SCREAMING_SNAKE_CASE	)
        __UpperCamelCase     :Dict			  =		[-1] * number_of_cells

        for car_index in range(SCREAMING_SNAKE_CASE	):
            __UpperCamelCase     :Dict			  =		next_speeds_calculated[car_index]
            if speed != -1:
                # Change the position based on the speed (with % to create the loop)
                __UpperCamelCase     :Dict			  =		(car_index + speed) % number_of_cells
                # Commit the change of position
                __UpperCamelCase     :Union[str, Any]			  =		speed
        highway.append(SCREAMING_SNAKE_CASE	)

    return highway


if __name__ == "__main__":
    import doctest

    doctest.testmod()







"""simple docstring"""





def 	__a     (		__lowerCamelCase  ):
   UpperCAmelCase_					:					List[str]			     =    int(__lowerCamelCase  )
   if n_element < 1:
      UpperCAmelCase_					:					List[Any]			     =    ValueError("a should be a positive number"  )
      raise my_error

   UpperCAmelCase_					:					List[Any]			     =    [1]
   UpperCAmelCase_     ,   UpperCAmelCase_     ,   UpperCAmelCase_					:					Optional[int]			     =    (0, 0, 0)
   UpperCAmelCase_					:					Dict			     =    1
   while index < n_element:
      while hamming_list[i] * 2 <= hamming_list[-1]:
         i += 1
      while hamming_list[j] * 3 <= hamming_list[-1]:
         j += 1
      while hamming_list[k] * 5 <= hamming_list[-1]:
         k += 1
      hamming_list.append(
          min(hamming_list[i] * 2,		hamming_list[j] * 3,		hamming_list[k] * 5  )  )
      index += 1
   return hamming_list


if __name__ == "__main__":
    _a		       =							input('Enter the last number (nth term) of the Hamming Number Series: ')
    print('Formula of Hamming Number Series => 2^i * 3^j * 5^k')
    _a		       =							hamming(int(n))
    print('-----------------------------------------------------')
    print(f"""The list with nth numbers is: {hamming_numbers}""")
    print('-----------------------------------------------------')


