


"""simple docstring"""



from __future__ import annotations

import matplotlib.pyplot as plt  # type: ignore
import numpy

# initial triangle of Koch snowflake
lowercase_							=							numpy.array([0, 0])
lowercase_							=							numpy.array([0.5, 0.866_0254])
lowercase_							=							numpy.array([1, 0])
lowercase_							=							[VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]
def      UpperCAmelCase     (       _lowercase :   Tuple			,   _lowercase :   str	)						-> list[numpy.ndarray]:


	"""simple docstring"""




	lowerCAmelCase_      							=			initial_vectors
	for _ in range(_lowercase	):
		lowerCAmelCase_      							=			iteration_step(_lowercase	)
	return vectors
def      UpperCAmelCase     (       _lowercase :   List[str]	)						-> list[numpy.ndarray]:


	"""simple docstring"""




	lowerCAmelCase_      							=			[]
	for i, start_vector in enumerate(vectors[:-1]	):
		lowerCAmelCase_      							=			vectors[i + 1]
		new_vectors.append(_lowercase	)
		lowerCAmelCase_      							=			end_vector - start_vector
		new_vectors.append(start_vector + difference_vector / 3	)
		new_vectors.append(
		    start_vector + difference_vector / 3 + rotate(difference_vector / 3			,   6_0	)	)
		new_vectors.append(start_vector + difference_vector * 2 / 3	)
	new_vectors.append(vectors[-1]	)
	return new_vectors
def      UpperCAmelCase     (       _lowercase :   Tuple			,   _lowercase :   List[Any]	)						-> numpy.ndarray:


	"""simple docstring"""




	lowerCAmelCase_      							=			numpy.radians(_lowercase	)
	lowerCAmelCase_							,	lowerCAmelCase_      							=			numpy.cos(_lowercase	), numpy.sin(_lowercase	)
	lowerCAmelCase_      							=			numpy.array(((c, -s), (s, c))	)
	return numpy.dot(_lowercase			,   _lowercase	)
def      UpperCAmelCase     (       _lowercase :   str	)						-> None:


	"""simple docstring"""




	lowerCAmelCase_      							=			plt.gca()
	axes.set_aspect('''equal'''	)

	# matplotlib.pyplot.plot takes a list of all x-coordinates and a list of all
	# y-coordinates as inputs, which are constructed from the vector-list using
	# zip()
	lowerCAmelCase_							,	lowerCAmelCase_      							=			zip(*_lowercase	)
	plt.plot(_lowercase			,   _lowercase	)
	plt.show()


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		lowercase_							=							iterate(INITIAL_VECTORS, 5)
		plot(processed_vectors)

def  __lowerCamelCase					( _lowercase = 50000000			)       ->      int:
     UpperCamelCase						    =					set()
     UpperCamelCase						    =					int((limit - 24) ** (1 / 2)			)

     UpperCamelCase						    =					set(range(3						,     prime_square_limit + 1						,     2			)			)
     primes.add(2			)
     for p in range(3						,     prime_square_limit + 1						,     2			):
          if p not in primes:
               continue
          primes.difference_update(set(range(p * p						,     prime_square_limit + 1						,     _lowercase			)			)			)

     for primea in primes:
          UpperCamelCase						    =					primea * primea
          for primea in primes:
               UpperCamelCase						    =					primea * primea * primea
               if square + cube >= limit - 16:
                    break
               for primea in primes:
                    UpperCamelCase						    =					primea * primea * primea * primea
                    UpperCamelCase						    =					square + cube + tetr
                    if total >= limit:
                         break
                    ret.add(_lowercase			)

     return len(_lowercase			)


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


