


'''simple docstring'''



def    lowerCamelCase__   ( ):




						'''simple docstring'''






						for n in range(1   ,     1_00_00_00  ):
												yield n * (n + 1) // 2


def    lowerCamelCase__   ( A     :    List[str]  ):




						'''simple docstring'''






						UpperCAmelCase         =			1
						UpperCAmelCase         =			2
						while i * i <= n:
												UpperCAmelCase         =			0
												while n % i == 0:
																		n //= i
																		multiplicity += 1
												divisors_count *= multiplicity + 1
												i += 1
						if n > 1:
												divisors_count *= 2
						return divisors_count


def    lowerCamelCase__   ( ):




						'''simple docstring'''






						return next(i for i in triangle_number_generator() if count_divisors(A  ) > 5_00  )


if __name__ == "__main__":
	print(solution())









'''simple docstring'''



import functools


def    lowerCamelCase__   ( A     :    list[int]   ,     A     :    list[int]  ):




						'''simple docstring'''






						if not isinstance(A   ,     A  ) or not all(isinstance(A   ,     A  ) for day in days  ):
												raise ValueError('''The parameter days should be a list of integers'''  )

						if len(A  ) != 3 or not all(isinstance(A   ,     A  ) for cost in costs  ):
												raise ValueError('''The parameter costs should be a list of three integers'''  )

						if len(A  ) == 0:
												return 0

						if min(A  ) <= 0:
												raise ValueError('''All days elements should be greater than 0'''  )

						if max(A  ) >= 3_66:
												raise ValueError('''All days elements should be less than 366'''  )

						UpperCAmelCase         =			set(A  )

						@functools.cache
						def dynamic_programming(A     :    int  ) -> int:
												if index > 3_65:
																		return 0

												if index not in days_set:
																		return dynamic_programming(index + 1  )

												return min(
												    costs[0] + dynamic_programming(index + 1  )   ,     costs[1] + dynamic_programming(index + 7  )   ,     costs[2] + dynamic_programming(index + 30  )   ,     )

						return dynamic_programming(1  )


if __name__ == "__main__":
	import doctest

	doctest.testmod()





