TEMA

Wrong answer (5%)

Bruno Batista Santos preguntado 8 months ago

Problema resolvido.

Este tema fue resuelto y no puede recibir nuevas respuestas.

  • feodorv respondido 8 months ago

            for (int z = menor+1; z < maior; z++) {

    And I do not know precisely but maybe input can contain negative values then soma % 5 can be negative:

    soma = z % 5;
    if( soma < 0 ) soma = soma + 5;
  • Bruno Batista Santos respondido 8 months ago

    Thanks for the feedback Feodorv, the problem is on line 23, as you said. I made the change and the code worked. There was no need to make the second change, because the question asks that the input values be positive. Thanks again.