

'''simple docstring'''



from __future__ import annotations

import requests







def   a__			(    a__		):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE      = F'https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty'
     return requests.get(a__		).json()







def   a__			(    a__ = 10		):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE      = """https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty"""
     __SCREAMING_SNAKE_CASE      = requests.get(a__		).json()[:max_stories]
     return [get_hackernews_story(a__		) for story_id in story_ids]







def   a__			(    a__ = 10		):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE      = hackernews_top_stories(a__		)
     return "\n".join("""* [{title}]({url})""".format(**a__		) for story in stories		)


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









'''simple docstring'''



import math







def   a__			(    a__		):




     """simple docstring"""


     return math.sqrt(a__		) * math.sqrt(a__		) == num







def   a__			(    a__		):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE      = 0
     __SCREAMING_SNAKE_CASE      = n
     while left <= right:
          __SCREAMING_SNAKE_CASE      = (left + right) // 2
          if mid**2 == n:
               return True
          elif mid**2 > n:
               __SCREAMING_SNAKE_CASE      = mid - 1
          else:
               __SCREAMING_SNAKE_CASE      = mid + 1
     return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()






