'''simple docstring'''

def snake_case_      (					__snake_case  :							int = 100)			->					int:
   lowerCAmelCase_			=      (n * (n + 1) // 2) ** 2
   lowerCAmelCase_			=      n * (n + 1) * (2 * n + 1) // 6
   return sum_cubes - sum_squares


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






'''simple docstring'''

import colorsys

from PIL import Image  # type: ignore



def snake_case_      (					__snake_case  :							float	,   __snake_case  :							float	,   __snake_case  :							int)			->					float:
   lowerCAmelCase_			=      x
   lowerCAmelCase_			=      y
   for step in range(__snake_case):  # noqa: B007
      lowerCAmelCase_			=      a * a - b * b + x
      lowerCAmelCase_			=      2 * a * b + y
      lowerCAmelCase_			=      a_new

      # divergence happens for all complex number with an absolute value
      # greater than 4
      if a * a + b * b > 4:
         break
   return step / (max_step - 1)



def snake_case_      (					__snake_case  :							float)			->					tuple:
   if distance == 1:
      return (0, 0, 0)
   else:
      return (255, 255, 255)



def snake_case_      (					__snake_case  :							float)			->					tuple:
   if distance == 1:
      return (0, 0, 0)
   else:
      return tuple(round(i * 255) for i in colorsys.hsv_to_rgb(__snake_case	,   1	,   1))



def snake_case_      (					__snake_case  :							int = 800	,   __snake_case  :							int = 600	,   __snake_case  :							float = -0.6	,   __snake_case  :							float = 0	,   __snake_case  :							float = 3.2	,   __snake_case  :							int = 50	,   __snake_case  :							bool = True	,   )			->					Image.Image:
   lowerCAmelCase_			=      Image.new('''RGB'''	,   (image_width, image_height))
   lowerCAmelCase_			=      img.load()

   # loop through the image-coordinates
   for image_x in range(__snake_case):
      for image_y in range(__snake_case):
         # determine the figure-coordinates based on the image-coordinates
         lowerCAmelCase_			=      figure_width / image_width * image_height
         lowerCAmelCase_			=      figure_center_x + (image_x / image_width - 0.5) * figure_width
         lowerCAmelCase_			=      figure_center_y + (image_y / image_height - 0.5) * figure_height

         lowerCAmelCase_			=      get_distance(__snake_case	,   __snake_case	,   __snake_case)

         # color the corresponding pixel based on the selected coloring-function
         if use_distance_color_coding:
            lowerCAmelCase_			=      get_color_coded_rgb(__snake_case)
         else:
            lowerCAmelCase_			=      get_black_and_white_rgb(__snake_case)

   return img


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 # colored version, full figure
 A_     :						List[str]    							=get_image()

 # uncomment for colored version, different section, zoomed in
 # img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
 # figure_width = 0.8)

 # uncomment for black and white version, full figure
 # img = get_image(use_distance_color_coding = False)

 # uncomment to save the image
 # img.save("mandelbrot.png")

 img.show()





