


"""simple docstring"""



def 						__lowerCAmelCase		(		lowercase						:						Any = 1000				)			->		Optional[Any]:


				"""simple docstring"""





				return sum(e for e in range(3		,							lowerCAmelCase__				) if e % 3 == 0 or e % 5 == 0				)


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









"""simple docstring"""



import numpy as np







class _lowerCAmelCase       :







   def __init__(			self		)			->	int:

       '''simple docstring'''




       snake_case					:   Optional[int]         =					(0, 0)
       snake_case					:   str         =					None
       snake_case					:   int         =					0
       snake_case					:   Optional[Any]         =					0
       snake_case					:   Tuple         =					0







   def __eq__(			self		,			UpperCamelCase__		)			->	Dict:

       '''simple docstring'''




       return self.position == cell.position







   def 				lowerCamelCase	(			self		)			->	str:

       '''simple docstring'''




       print(self.position		)







class _lowerCAmelCase       :







   def __init__(			self		,			UpperCamelCase__=(5, 5)		)			->	List[Any]:

       '''simple docstring'''




       snake_case					:   Optional[Any]         =					np.zeros(UpperCamelCase__		)
       snake_case					:   str         =					world_size[0]
       snake_case					:   str         =					world_size[1]







   def 				lowerCamelCase	(			self		)			->	int:

       '''simple docstring'''




       print(self.w		)







   def 				lowerCamelCase	(			self		,			UpperCamelCase__		)			->	List[str]:

       '''simple docstring'''




       snake_case					:   Optional[int]         =					[
           (-1, -1),
           (-1, 0),
           (-1, 1),
           (0, -1),
           (0, 1),
           (1, -1),
           (1, 0),
           (1, 1),
       ]
       snake_case					:   Tuple         =					cell.position[0]
       snake_case					:   str         =					cell.position[1]
       snake_case					:   List[Any]         =					[]
       for n in neughbour_cord:
           snake_case					:   Any         =					current_x + n[0]
           snake_case					:   List[str]         =					current_y + n[1]
           if 0 <= x < self.world_x_limit and 0 <= y < self.world_y_limit:
               snake_case					:   Tuple         =					Cell()
               snake_case					:   int         =					(x, y)
               snake_case					:   List[Any]         =					cell
               neighbours.append(UpperCamelCase__		)
       return neighbours







def 						__lowerCAmelCase		(		lowercase						:						Union[str, Any]		,							lowercase						:						Union[str, Any]		,							lowercase						:						Union[str, Any]				)			->		Any:


    """simple docstring"""





    snake_case					:   Tuple         =					[]
    snake_case					:   List[Any]         =					[]
    _open.append(lowercase				)

    while _open:
        snake_case					:   Union[str, Any]         =					np.argmin([n.f for n in _open]				)
        snake_case					:   Tuple         =					_open[min_f]
        _closed.append(_open.pop(lowercase				)				)
        if current == goal:
            break
        for n in world.get_neigbours(lowercase				):
            for c in _closed:
                if c == n:
                    continue
            snake_case					:   int         =					current.g + 1
            snake_case      ,snake_case					:   Any         =					n.position
            snake_case      ,snake_case					:   Any         =					goal.position
            snake_case					:   int         =					(ya - ya) ** 2 + (xa - xa) ** 2
            snake_case					:   List[Any]         =					n.h + n.g

            for c in _open:
                if c == n and c.f < n.f:
                    continue
            _open.append(lowercase				)
    snake_case					:   str         =					[]
    while current.parent is not None:
        path.append(current.position				)
        snake_case					:   List[str]         =					current.parent
    path.append(current.position				)
    return path[::-1]


if __name__ == "__main__":
  __snake_case         =					Gridworld()
  # Start position and goal
  __snake_case         =					Cell()
  __snake_case         =					(0, 0)
  __snake_case         =					Cell()
  __snake_case         =					(4, 4)
  print(F'''path from {start.position} to {goal.position}''')
  __snake_case         =					astar(world, start, goal)
  #   Just for visual reasons.
  for i in s:
    __snake_case         =					1
  print(world.w)





