


import os





def   _lowerCAmelCase				(   UpperCamelCase__:     str = "matrix.txt"						) ->   int:





	"""simple docstring"""







	with open(os.path.join(os.path.dirname(UpperCamelCase__						)							,					UpperCamelCase__						)						) as in_file:
		A								=				in_file.read()

	A								=				[[int(UpperCamelCase__						) for cell in row.split(""","""						)] for row in data.strip().splitlines()]
	A								=				[[0 for cell in row] for row in grid]
	A								=				len(grid[0]						)

	A								=				[[0 for i in range(UpperCamelCase__						)] for j in range(UpperCamelCase__						)]
	A								=				grid[0][0]
	for i in range(1							,					UpperCamelCase__						):
		A								=				grid[0][i] + dp[0][i - 1]
	for i in range(1							,					UpperCamelCase__						):
		A								=				grid[i][0] + dp[i - 1][0]

	for i in range(1							,					UpperCamelCase__						):
		for j in range(1							,					UpperCamelCase__						):
			A								=				grid[i][j] + min(dp[i - 1][j]							,					dp[i][j - 1]						)

	return dp[-1][-1]


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







from __future__ import annotations

import requests





def   _lowerCAmelCase				(   UpperCamelCase__:     str						) ->   dict:





	"""simple docstring"""







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





def   _lowerCAmelCase				(   UpperCamelCase__:     int = 10						) ->   list[dict]:





	"""simple docstring"""







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





def   _lowerCAmelCase				(   UpperCamelCase__:     int = 10						) ->   str:





	"""simple docstring"""







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


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



