




'''simple docstring'''





from __future__ import annotations

import math

import numpy as np
from numpy.linalg import norm





def       __a      (  _UpperCamelCase:       np.ndarray   ,		_UpperCamelCase:       np.ndarray       )		->					float:

     """simple docstring"""




     return math.sqrt(sum(pow(a - b   ,		2       ) for a, b in zip(_UpperCamelCase   ,		_UpperCamelCase       )       )       )





def       __a      (  _UpperCamelCase:       np.ndarray   ,		_UpperCamelCase:       np.ndarray       )		->					list[list[list[float] | float]]:

     """simple docstring"""




     if dataset.ndim != value_array.ndim:
          _snake_case				= (
              "Wrong input data's dimensions... "
              F"""dataset : {dataset.ndim}, value_array : {value_array.ndim}"""
          )
          raise ValueError(_UpperCamelCase       )

     try:
          if dataset.shape[1] != value_array.shape[1]:
               _snake_case				= (
                   "Wrong input data's shape... "
                   F"""dataset : {dataset.shape[1]}, value_array : {value_array.shape[1]}"""
               )
               raise ValueError(_UpperCamelCase       )
     except IndexError:
          if dataset.ndim != value_array.ndim:
               raise TypeError("Wrong shape"       )

     if dataset.dtype != value_array.dtype:
          _snake_case				= (
              "Input data have different datatype... "
              F"""dataset : {dataset.dtype}, value_array : {value_array.dtype}"""
          )
          raise TypeError(_UpperCamelCase       )

     _snake_case				= []

     for value in value_array:
          _snake_case				= euclidean(_UpperCamelCase   ,		dataset[0]       )
          _snake_case				= dataset[0].tolist()

          for dataset_value in dataset[1:]:
               _snake_case				= euclidean(_UpperCamelCase   ,		_UpperCamelCase       )

               if dist > temp_dist:
                    _snake_case				= temp_dist
                    _snake_case				= dataset_value.tolist()

          answer.append([vector, dist]       )

     return answer





def       __a      (  _UpperCamelCase:       np.ndarray   ,		_UpperCamelCase:       np.ndarray       )		->					float:

     """simple docstring"""




     return np.dot(_UpperCamelCase   ,		_UpperCamelCase       ) / (norm(_UpperCamelCase       ) * norm(_UpperCamelCase       ))


if __name__ == "__main__":
   import doctest

   doctest.testmod()








'''simple docstring'''





from math import ceil





def       __a      (  _UpperCamelCase:       int = 1_001       )		->					int:

     """simple docstring"""




     _snake_case				= 1

     for i in range(1   ,		int(ceil(n / 2.0       )       )       ):
          _snake_case				= 2 * i + 1
          _snake_case				= 2 * i
          _snake_case				= total + 4 * odd**2 - 6 * even

     return total


if __name__ == "__main__":
   import sys

   if len(sys.argv) == 1:
      print(solution())
   else:
      try:
         UpperCamelCase_		:     int          =		int(sys.argv[1])
         print(solution(n))
      except ValueError:
         print('''Invalid entry - please enter a number''')


