

"""simple docstring"""




def 	UpperCAmelCase__   (				A__	,    A__	,    A__   )      ->      float:




   """simple docstring"""
   lowerCamelCase__						=			(num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
   # formula for sum of series
   return total



def 	UpperCAmelCase__   (				)      ->      Any:




   """simple docstring"""
   print(sum_of_series(1	,    1	,    10   )   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()







"""simple docstring"""




# Algorithm for the pigeonhole sorting





def 	UpperCAmelCase__   (				A__   )      ->      Dict:




   """simple docstring"""
   lowerCamelCase__						=			min(A__   )  # min() finds the minimum value
   lowerCamelCase__						=			max(A__   )  # max() finds the maximum value

   lowerCamelCase__						=			max_val - min_val + 1  # size is difference of max and min values plus one

   # list of pigeonholes of size equal to the variable size
   lowerCamelCase__						=			[0] * size

   # Populate the pigeonholes.
   for x in a:
      assert isinstance(A__	,    A__   ), "integers only please"
      holes[x - min_val] += 1

   # Putting the elements back into the array in an order.
   lowerCamelCase__						=			0
   for count in range(A__   ):
      while holes[count] > 0:
         holes[count] -= 1
         lowerCamelCase__						=			count + min_val
         i += 1



def 	UpperCAmelCase__   (				)      ->      Optional[int]:




   """simple docstring"""
   lowerCamelCase__						=			[8, 3, 2, 7, 4, 6, 8]
   pigeonhole_sort(A__   )
   print("Sorted order is:"	,    " ".join(A__   )   )


if __name__ == "__main__":
     main()




