code: 
  
  
  
  import functools
  from math import sqrt
  from time import time
  
  
  
  
  
  
  def 			__lowercase     (				a__							,     *a__							,     **a__     )       ->				Optional[Any]:
  							__SCREAMING_SNAKE_CASE								=      time()
  							__SCREAMING_SNAKE_CASE								=      func(*a__							,     **a__     )
  							__SCREAMING_SNAKE_CASE								=      time()
  							if int(end - start     ) > 0:
  														print(f"""{func.__name__} runtime: {(end - start):0.4f} s"""     )
  							else:
  														print(f"""{func.__name__} runtime: {(end - start) * 10_00:0.4f} ms"""     )
  							return output
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				list[int]:
  							if n < 0:
  														raise Exception('n is negative'     )
  							if n == 0:
  														return [0]
  							__SCREAMING_SNAKE_CASE								=      [0, 1]
  							for _ in range(n - 1     ):
  														fib.append(fib[-1] + fib[-2]     )
  							return fib
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				list[int]:
  
  							def fib_recursive_term(a__     ) -> int:
  														if i < 0:
  																					raise Exception('n is negative'     )
  														if i < 2:
  																					return i
  														return fib_recursive_term(i - 1     ) + fib_recursive_term(i - 2     )
  
  							if n < 0:
  														raise Exception('n is negative'     )
  							return [fib_recursive_term(a__     ) for i in range(n + 1     )]
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				list[int]:
  
  							@functools.cache
  							def fib_recursive_term(a__     ) -> int:
  														if i < 0:
  																					raise Exception('n is negative'     )
  														if i < 2:
  																					return i
  														return fib_recursive_term(i - 1     ) + fib_recursive_term(i - 2     )
  
  							if n < 0:
  														raise Exception('n is negative'     )
  							return [fib_recursive_term(a__     ) for i in range(n + 1     )]
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				list[int]:
  							if n < 0:
  														raise Exception('n is negative'     )
  							# Cache must be outside recursuive function
  							# other it will reset every time it calls itself.
  							__SCREAMING_SNAKE_CASE								=      {0: 0, 1: 1, 2: 1}  # Prefilled cache
  
  							def rec_fn_memoized(a__     ) -> int:
  														if num in cache:
  																					return cache[num]
  
  														__SCREAMING_SNAKE_CASE								=      rec_fn_memoized(num - 1     ) + rec_fn_memoized(num - 2     )
  														__SCREAMING_SNAKE_CASE								=      value
  														return value
  
  							return [rec_fn_memoized(a__     ) for i in range(n + 1     )]
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				list[int]:
  							if n < 0:
  														raise Exception('n is negative'     )
  							if n >= 14_75:
  														raise Exception('n is too large'     )
  							__SCREAMING_SNAKE_CASE								=      sqrt(5     )
  							__SCREAMING_SNAKE_CASE								=      (1 + sqrt_a) / 2
  							return [round(phi**i / sqrt_a     ) for i in range(n + 1     )]
  
  
  if __name__ == "__main__":
  			lowerCAmelCase__	:  Dict 		=30
  			time_func(fib_iterative, num)
  			time_func(fib_recursive, num)  # Around 3s runtime
  			time_func(fib_recursive_cached, num)  # Around 0ms runtime
  			time_func(fib_memoization, num)
  			time_func(fib_binet, num)
  
  
  
  
  
  
  
style_context: 
  
  
  
  from itertools import combinations, product
  
  
  
  
  
  
  def 			__lowercase     (				a__							,     a__							,     a__							,     a__     )       ->				bool:
  							if xa == ya == 0 or xa == ya == 0:
  														return False
  							__SCREAMING_SNAKE_CASE								=      xa * xa + ya * ya
  							__SCREAMING_SNAKE_CASE								=      xa * xa + ya * ya
  							__SCREAMING_SNAKE_CASE								=      (xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
  							return (
  							    a_square + b_square == c_square
  							    or a_square + c_square == b_square
  							    or b_square + c_square == a_square
  							)
  
  
  
  
  
  
  def 			__lowercase     (				a__ = 50     )       ->				int:
  							return sum(
  							    1
  							    for pta, pta in combinations(product(range(limit + 1     )							,     repeat=2     )							,     2     )
  							    if is_right(*a__							,     *a__     )     )
  
  
  if __name__ == "__main__":
  			print(F'''{solution() = }''')
  
  
  
  
  
  
  