PythiloMedium · 25 min · Task 58 of 100 · progress kept in this browser

Choose nonadjacent rewards

Return the largest sum of nonadjacent nonnegative values in a line. Choosing no values is allowed.

older, previous, value = 2, 7, 9
print(max(previous, older+value))
Your task

Return the largest sum of nonadjacent nonnegative values in a line. Choosing no values is allowed.