TOPIC

Wrong answer (5%)

🎈Leandro Rodrigues🎈 asked 1 year ago

Alguém pode me ajudar? WA(5%).

Question solved. Code removed.

This topic was solved and cannot recieve new replies.

  • feodorv replied 1 year ago

    Your code gives incorrect answer 4 for the input

    0 1

    Correct answer is 3. Moreover some inputs require negative values:

    0 5

    Here we have

    0 - 7 = -7
    -7 / 3 = -2
    -2 + 7 = 5

    Or 3 steps in total. Your code gives 5 on this input.

  • 🎈Leandro Rodrigues🎈 replied 1 year ago

    I got it, thanks. I'll fix it here :D