


'''simple docstring'''






import os


def  _snake_case       (					)						->   Optional[int]:
							lowerCAmelCase__	       =     os.path.dirname(os.path.realpath(A	)	)
							lowerCAmelCase__	       =     os.path.join(A			,   '''triangle.txt'''	)

							with open(A	) as f:
														lowerCAmelCase__	       =     f.readlines()

							lowerCAmelCase__	       =     []
							for line in triangle:
														lowerCAmelCase__	       =     []
														for number in line.strip().split(''' '''	):
																					numbers_from_line.append(int(A	)	)
														a.append(A	)

							for i in range(1			,   len(A	)	):
														for j in range(len(a[i]	)	):
																					lowerCAmelCase__	       =     a[i - 1][j] if j != len(a[i - 1]	) else 0
																					lowerCAmelCase__	       =     a[i - 1][j - 1] if j > 0 else 0
																					a[i][j] += max(A			,   A	)
							return max(a[-1]	)


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



'''simple docstring'''






from __future__ import annotations

import math
from collections.abc import Callable


def  _snake_case       (					A			,   A			,   A			,   A = 100			,   )						->   float:
							lowerCAmelCase__	       =     x_start
							lowerCAmelCase__	       =     fnc(A	)
							lowerCAmelCase__	       =     0.0

							for _ in range(A	):
														# Approximates curve as a sequence of linear lines and sums their length
														lowerCAmelCase__	       =     (x_end - x_start) / steps + xa
														lowerCAmelCase__	       =     fnc(A	)
														length += math.hypot(xa - xa			,   fxa - fxa	)

														# Increment step
														lowerCAmelCase__	       =     xa
														lowerCAmelCase__	       =     fxa

							return length


if __name__ == "__main__":


		def  _snake_case       (					A	)						->   List[Any]:
									return math.sin(10 * x	)

		print('''f(x) = sin(10 * x)''')
		print('''The length of the curve from x = -10 to x = 10 is:''')
		__UpperCAmelCase       =							10
		while i <= 100_000:
				print(f"""With {i} steps: {line_length(f, -10, 10, i)}""")
				i *= 10