


'''simple docstring'''







from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	int  )  ->			int:
       _a    : str     					=prime_factors(_UpperCAmelCase  )
       if is_square_free(_UpperCAmelCase  ):
              return -1 if len(_UpperCAmelCase  ) % 2 else 1
       return 0


if __name__ == "__main__":
   import doctest

   doctest.testmod()






'''simple docstring'''







from __future__ import annotations

import requests


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	str  )  ->			dict:
       _a    : Any     					=F"https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty"
       return requests.get(_UpperCAmelCase  ).json()


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	int = 10  )  ->			list[dict]:
       _a    : Union[str, Any]     					="""https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"""
       _a    : int     					=requests.get(_UpperCAmelCase  ).json()[:max_stories]
       return [get_hackernews_story(_UpperCAmelCase  ) for story_id in story_ids]


def 	SCREAMING_SNAKE_CASE_					(  _UpperCAmelCase	:	int = 10  )  ->			str:
       _a    : Union[str, Any]     					=hackernews_top_stories(_UpperCAmelCase  )
       return "\n".join("""* [{title}]({url})""".format(**_UpperCAmelCase  ) for story in stories  )


if __name__ == "__main__":
   print(hackernews_top_stories_as_markdown())


