"""simple docstring"""







from __future__ import annotations


def 					a__ (						UpperCAmelCase__    :     float | int						,     UpperCAmelCase__    :     float | int						,     UpperCAmelCase__    :     float | int						,     )->		list[float | int]:
						if not all((nth_term, start_term_a, common_ratio_r)     ):
												return []
						UpperCAmelCase__   		=						[]
						UpperCAmelCase__   		=						1
						UpperCAmelCase__   		=						common_ratio_r
						for _ in range(int(UpperCAmelCase__     )     ):
												if not series:
																		series.append(UpperCAmelCase__     )
												else:
																		power += 1
																		series.append(float(start_term_a * multiple     )     )
																		UpperCAmelCase__   		=						pow(float(UpperCAmelCase__     )						,     UpperCAmelCase__     )
						return series


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						UpperCamelCase_    :    str											=						float(input("""Enter the last number (n term) of the Geometric Series"""))
						UpperCamelCase_    :    Union[str, Any]											=						float(input("""Enter the starting term (a) of the Geometric Series"""))
						UpperCamelCase_    :    Dict											=						float(
						    input("""Enter the common ratio between two terms (r) of the Geometric Series""")
						)
						print("""Formula of Geometric Series => a + ar + ar^2 ... +ar^n""")
						print(geometric_series(nth_term, start_term_a, common_ratio_r))


"""simple docstring"""







from __future__ import annotations


def 					a__ (						UpperCAmelCase__    :     int     )->		list[int]:
						assert (
						    isinstance(UpperCAmelCase__						,     UpperCAmelCase__     ) and mask > 0
						), f'mask needs to be positive integer, your input {mask}'
						UpperCAmelCase__   		=						[]
						UpperCAmelCase__   		=						mask

						while submask:
												all_submasks.append(UpperCAmelCase__     )
												UpperCAmelCase__   		=						(submask - 1) & mask

						return all_submasks


if __name__ == "__main__":
						import doctest

						doctest.testmod()

