I got an error message but result is ok

code%202%20error

note that i did solved the task, can you help me ?

Your error message shows a different input from what you’re using.
Getting the right answer for one input doesn’t mean it’s correct for all others, your function should be able to handle the input that the error message mentions as well.

Thank you, I did solve the problem by creating a new else statement including an action that ejecutates only if the element stored in the inicial index is below zero so it stores this negative value in maxnun variable anyways to compare it with the next index value