


"""simple docstring"""







from collections import defaultdict
from math import gcd




def        UpperCAmelCase__	(lowerCAmelCase_ = 150_0000       ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						       =    defaultdict(lowerCAmelCase_       )
					__SCREAMING_SNAKE_CASE						       =    2
					while 2 * euclid_m * (euclid_m + 1) <= limit:
										for euclid_n in range((euclid_m % 2) + 1  ,						lowerCAmelCase_  ,						2       ):
															if gcd(lowerCAmelCase_  ,						lowerCAmelCase_       ) > 1:
																				continue
															__SCREAMING_SNAKE_CASE						       =    2 * euclid_m * (euclid_m + euclid_n)
															for perimeter in range(lowerCAmelCase_  ,						limit + 1  ,						lowerCAmelCase_       ):
																				frequencies[perimeter] += 1
										euclid_m += 1
					return sum(1 for frequency in frequencies.values() if frequency == 1       )


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




"""simple docstring"""







from __future__ import annotations

import requests




def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


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




def        UpperCAmelCase__	(lowerCAmelCase_ = 10       ):




					'''simple docstring'''


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




def        UpperCAmelCase__	(lowerCAmelCase_ = 10       ):




					'''simple docstring'''


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


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