def 	UpperCAmelCase       (		lowerCAmelCase_       )	->	bool:
     a  :    int				=						9

     while num > 0:
          if num % 1_0 != digit:
               return False
          num //= 1_0_0
          digit -= 1

     return True







def 	UpperCAmelCase       (		)	->	int:
     a  :    Any				=						1_3_8_9_0_2_6_6_3

     while not is_square_form(num * num       ):
          if num % 1_0 == 3:
               num -= 6  # (3 - 6) % 10 = 7
          else:
               num -= 4  # (7 - 4) % 10 = 3

     return num * 1_0


if __name__ == "__main__":
  print(F'''{solution() = }''')
from __future__ import annotations







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


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  UpperCAmelCase							   =      float(input("""Enter the last number (n term) of the Geometric Series"""))
  UpperCAmelCase							   =      float(input("""Enter the starting term (a) of the Geometric Series"""))
  UpperCAmelCase							   =      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))