


"""simple docstring"""







import os






def 					a__ (       ):





						"""simple docstring"""

						UpperCAmelCase__		=    os.path.dirname(os.path.realpath(_UpperCamelCase ) )
						UpperCAmelCase__		=    os.path.join(_UpperCamelCase	,			'''triangle.txt''' )

						with open(_UpperCamelCase ) as in_file:
												UpperCAmelCase__		=    [[int(_UpperCamelCase ) for i in line.split()] for line in in_file]

						while len(_UpperCamelCase ) != 1:
												UpperCAmelCase__		=    triangle.pop()
												UpperCAmelCase__		=    triangle[-1]
												for j in range(len(_UpperCamelCase ) - 1 ):
																		curr_row[j] += max(last_row[j]	,			last_row[j + 1] )
						return triangle[0][0]


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



"""simple docstring"""







from __future__ import annotations

from collections.abc import Callable






def 					a__ (       _UpperCamelCase	,			_UpperCamelCase	,			_UpperCamelCase	,			_UpperCamelCase = 100	,			):





						"""simple docstring"""

						UpperCAmelCase__		=    x_start
						UpperCAmelCase__		=    fnc(_UpperCamelCase )
						UpperCAmelCase__		=    0.0

						for _ in range(_UpperCamelCase ):
												# Approximates small segments of curve as linear and solve
												# for trapezoidal area
												UpperCAmelCase__		=    (x_end - x_start) / steps + xa
												UpperCAmelCase__		=    fnc(_UpperCamelCase )
												area += abs(fxa + fxa ) * (xa - xa) / 2

												# Increment step
												UpperCAmelCase__		=    xa
												UpperCAmelCase__		=    fxa
						return area


if __name__ == "__main__":






						def 					a__ (       _UpperCamelCase ):





												"""simple docstring"""

												return x**3

						print("f(x) = x^3")
						print("The area between the curve, x = -10, x = 10 and the x axis is:")
						__a			 =   10
						while i <= 10_00_00:
												__a			 =   trapezoidal_area(f, -5, 5, i)
												print(f'''with {i} steps: {area}''')
												i *= 10