
"""simple docstring"""






from __future__ import annotations

from pathlib import Path





def     lowerCAmelCase__ (		__magic_name__ ,      __magic_name__			)	->int:
			return pointa[0] * pointa[1] - pointa[1] * pointa[0]





def     lowerCAmelCase__ (		__magic_name__ ,      __magic_name__ ,      __magic_name__ ,      __magic_name__ ,      __magic_name__ ,      __magic_name__			)	->bool:
			__lowercase						      =					(xa, ya)
			__lowercase						      =					(xa - xa, ya - ya)
			__lowercase						      =					(xa - xa, ya - ya)
			__lowercase						      =					-vector_product(__magic_name__ ,      __magic_name__			) / vector_product(
			    __magic_name__ ,      __magic_name__			)
			__lowercase						      =					+vector_product(__magic_name__ ,      __magic_name__			) / vector_product(
			    __magic_name__ ,      __magic_name__			)

			return a > 0 and b > 0 and a + b < 1





def     lowerCAmelCase__ (		__magic_name__ = "p102_triangles.txt"			)	->int:
			__lowercase						      =					Path(__magic_name__			).parent.joinpath(__magic_name__			).read_text(encoding="utf-8"			)

			__lowercase						      =					[]
			for line in data.strip().split("\n"			):
						triangles.append([int(__magic_name__			) for number in line.split(","			)]			)

			__lowercase						      =					0
			__lowercase						      =					4_2

			for triangle in triangles:
						ret += contains_origin(*__magic_name__			)

			return ret


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







"""simple docstring"""






import os



def     lowerCAmelCase__ (		)	->Tuple:
			__lowercase						      =					0
			__lowercase						      =					0
			with open(os.path.dirname(__magic_name__			) + "/p022_names.txt"			) as file:
						__lowercase						      =					str(file.readlines()[0]			)
						__lowercase						      =					name.replace("\"" ,      ""			).split(","			)

			name.sort()
			for i in range(len(__magic_name__			)			):
						for j in name[i]:
									temp_sum += ord(__magic_name__			) - ord("A"			) + 1
						total_sum += (i + 1) * temp_sum
						__lowercase						      =					0
			return total_sum


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





