<jupyter_start><jupyter_text>[Problem 67](https://projecteuler.net/problem=67)Maximum path sum II<jupyter_code>with open("./data/p067.txt") as f:
    l = f.readlines()
triangle = []
for line in l:
    line = line.split()
    a = [int(i) for i in line]
    triangle.append(a)
dp = [[0 for _ in range(100)] for _ in range(100)]
dp[0][0]=triangle[0][0]
for i in range(1,100):
    for j in range(i+1):
        dp[i][j]=dp[i][j]=dp[i-1][j]+triangle[i][j] if dp[i-1][j]>dp[i-1][j-1] else dp[i-1][j-1]+triangle[i][j]
#dp
max(max(dp))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22122302158273383, 'fraction_numerical': 0.052158273381294966, 'mean_word_length': 4.514851485148514, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '542250', 'license': 'MIT', 'n_tokens_mistral': 265, 'n_tokens_neox': 244, 'n_words': 48, 'path': 'p067.ipynb', 'repo_name': 'yonesuke/ProjectEuler', 'size': '556'}