WA 100% - Já testado no uDebug

Júlia D. Craide asked 1 year ago


Já testei com todos os casos do uDebug e não consegui entender o motivo do erro.

Question solved. Code removed.

This topic was solved and cannot recieve new replies.

  • feodorv replied 1 year ago

    Seems that (-1 % 2) is -1 and not 1 as you've expected. You can try

    int mn1 = n1 & 1;
  • Júlia D. Craide replied 1 year ago

    Thanks, that worked.