






"""simple docstring"""


import functools


def        UpperCAmelCase      (					a__     ,      a__ ):





						'''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' )

						lowerCAmelCase   :str						=			set(a__ )

						@functools.cache
						def dynamic_programming(a__ ) -> 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()







"""simple docstring"""


import qiskit


def        UpperCAmelCase      (					a__     ,      a__ ):





						'''simple docstring'''






						lowerCAmelCase   :List[Any]						=			qiskit.Aer.get_backend('aer_simulator' )

						# Create a Quantum Circuit acting on the q register
						lowerCAmelCase   :Optional[int]						=			qiskit.QuantumCircuit(a__     ,      a__ )

						# Apply X (NOT) Gate to Qubits 0 & 1
						circuit.x(0 )
						circuit.x(1 )

						# Map the quantum measurement to the classical bits
						circuit.measure([0, 1]     ,      [0, 1] )

						# Execute the circuit on the qasm simulator
						lowerCAmelCase   :Dict						=			qiskit.execute(a__     ,      a__     ,      shots=10_00 )

						# Return the histogram data of the results of the experiment.
						return job.result().get_counts(a__ )


if __name__ == "__main__":
		__SCREAMING_SNAKE_CASE   =   single_qubit_measure(2, 2)
		print(F"""Total count for various states are: {counts}""")