fromfunctoolsimportlru_cache@lru_cachedefmodel_population_growth(n:int,k:int,pop:int=1)->int:"""
Calculates the rabbit population after `n` months using the Fibonacci sequence.
Args:
n (int): The number of months.
k (int): The number of offspring per rabbit pair.
pop (int, optional): The initial population. Defaults to 1.
Returns:
int: The rabbit population after `n` months.
Examples:
>>> rabbit_population = rabbitPop(5, 3)
>>> print(rabbit_population)
19
"""ifn==1orn==2:returnpopreturnrabbitPop(n-1,k)+(rabbitPop(n-2,k)*k)