

'''simple docstring'''
def 	UpperCamelCase   (       lowercase_						:    float     ,					lowercase_						:    float     ,					lowercase_						:    int	)		->	float:




  '''simple docstring'''



  if principal <= 0:
    raise Exception('''Principal borrowed must be > 0'''	)
  if rate_per_annum < 0:
    raise Exception('''Rate of interest must be >= 0'''	)
  if years_to_repay <= 0 or not isinstance(lowercase_     ,					lowercase_	):
    raise Exception('''Years to repay must be an integer > 0'''	)

  # Yearly rate is divided by 12 to get monthly rate
  lowercase									=rate_per_annum / 1_2

  # Years to repay is multiplied by 12 to get number of payments as payment is monthly
  lowercase									=years_to_repay * 1_2

  return (
      principal
      * rate_per_month
      * (1 + rate_per_month) ** number_of_payments
      / ((1 + rate_per_month) ** number_of_payments - 1)
  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()



"""simple docstring"""
from __future__ import annotations

from functools import lru_cache
from math import ceil

_A							=  1_00

_A							=  set(range(3, NUM_PRIMES, 2))
primes.add(2)
_A							=  42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
    if prime not in primes:
        continue
    primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))




@lru_cache(maxsize=1_00    )
def 					a__						(						lowerCAmelCase    )	-> set[int]:
      if number_to_partition < 0:
            return set()
      elif number_to_partition == 0:
            return {1}

      UpperCAmelCase__			:							set[int]							=    set()
      UpperCAmelCase__			:							int
      UpperCAmelCase__			:							int

      for prime in primes:
            if prime > number_to_partition:
                  continue
            for sub in partition(number_to_partition - prime    ):
                  ret.add(sub * prime    )

      return ret




def 					a__						(						lowerCAmelCase = 50_00    )	-> int | None:
      for number_to_partition in range(1			,	lowerCAmelCase    ):
            if len(partition(lowerCAmelCase    )    ) > number_unique_partitions:
                  return number_to_partition
      return None


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

