



"""simple docstring"""







from __future__ import annotations

from collections.abc import Generator


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase	):
		if not isinstance(__UpperCAmelCase					,							__UpperCAmelCase	) or n < 1:
				raise Exception("""Sequence only defined for positive integers"""	)

		yield n
		while n != 1:
				if n % 2 == 0:
						n //= 2
				else:
						_lowercase							:      Optional[int]			=					3 * n + 1
				yield n


def       __SCREAMING_SNAKE_CASE      (   ):
		_lowercase							:      Optional[Any]			=					43
		_lowercase							:      Any			=					tuple(collatz_sequence(__UpperCAmelCase	)	)
		print(__UpperCAmelCase	)
		print(F"""Collatz sequence from {n} took {len(__UpperCAmelCase	)} steps."""	)


if __name__ == "__main__":
		main()








"""simple docstring"""







from itertools import combinations_with_replacement


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase = 100	):
		_lowercase							:      list[int]			=					[*list(range(1					,							21	)	), 25]
		_lowercase							:      list[int]			=					[2 * x for x in range(1					,							21	)] + [50]
		_lowercase							:      list[int]			=					[3 * x for x in range(1					,							21	)]
		_lowercase							:      list[int]			=					singles + doubles + triples + [0]

		_lowercase							:      int			=					0
		_lowercase							:      int
		_lowercase							:      int
		_lowercase							:      int
		_lowercase							:      int

		for double in doubles:
				for throwa, throwa in combinations_with_replacement(__UpperCAmelCase					,							2	):
						_lowercase							:      Union[str, Any]			=					double + throwa + throwa
						if checkout_total < limit:
								num_checkouts += 1

		return num_checkouts


if __name__ == "__main__":
		print(F'{solution() = }')



