

'''simple docstring'''





import os






def  UpperCamelCase_(							):




			"""simple docstring"""






			__a						   =os.path.dirname(os.path.realpath(_snake_case			)			)
			__a						   =os.path.join(_snake_case ,  'triangle.txt'			)

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

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


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









import os
import sys
import time

from . import transposition_cipher as trans_cipher






def  UpperCamelCase_(							):




			"""simple docstring"""






			__a						   ='Prehistoric Men.txt'
			__a						   ='Output.txt'
			__a						   =int(input('Enter key: '			)			)
			__a						   =input('Encrypt/Decrypt [e/d]: '			)

			if not os.path.exists(_snake_case			):
						print(F'File {input_file} does not exist. Quitting...'			)
						sys.exit()
			if os.path.exists(_snake_case			):
						print(F'Overwrite {output_file}? [y/n]'			)
						__a						   =input('> '			)
						if not response.lower().startswith('y'			):
									sys.exit()

			__a						   =time.time()
			if mode.lower().startswith('e'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.encrypt_message(_snake_case ,  _snake_case			)
			elif mode.lower().startswith('d'			):
						with open(_snake_case			) as f:
									__a						   =f.read()
						__a						   =trans_cipher.decrypt_message(_snake_case ,  _snake_case			)

			with open(_snake_case ,  'w'			) as output_obj:
						output_obj.write(_snake_case			)

			__a						   =round(time.time() - start_time ,  2			)
			print(('Done (', total_time, 'seconds )')			)


if __name__ == "__main__":
						main()






