





'''simple docstring'''

import os

# Precomputes a list of the 100 first triangular numbers
_A				:    List[Any]     						=[int(0.5 * n * (n + 1)) for n in range(1, 1_0_1)]







def 						__UpperCamelCase				(							) ->			Union[str, Any]:
	_lowercase					:       str       =		os.path.dirname(os.path.realpath(__lowercase					)					)
	_lowercase					:       Tuple       =		os.path.join(__lowercase,				'words.txt'					)

	_lowercase					:       str       =		''
	with open(__lowercase					) as f:
		_lowercase					:       Optional[Any]       =		f.readline()

	_lowercase					:       Tuple       =		[word.strip('"'					) for word in words.strip('\r\n'					).split(','					)]
	_lowercase					:       Optional[Any]       =		[
	    word
	    for word in [sum(ord(__lowercase					) - 64 for x in word					) for word in words]
	    if word in TRIANGULAR_NUMBERS
	]
	return len(__lowercase					)


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





'''simple docstring'''

from __future__ import annotations

import requests







def 						__UpperCamelCase				(							_lowercase					) ->			dict:
	_lowercase					:       Optional[int]       =		f'''https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty'''
	return requests.get(_lowercase					).json()







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







def 						__UpperCamelCase				(							_lowercase = 10					) ->			str:
	_lowercase					:       Tuple       =		hackernews_top_stories(_lowercase					)
	return "\n".join('* [{title}]({url})'.format(**_lowercase					) for story in stories					)


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