Wrong answer (50%)

Pether asked 1 year ago

Algúem me ajuda? Deu certo com todos os casos de teste do uDebug, mas dá WA(50%)

Question solved. Code removed.

This topic was solved and cannot recieve new replies.

  • feodorv replied 1 year ago

    Oh, please, try to evade the float functions with the integer arithmetic. You can easily check that a positive number is a power of 2 as

    (num & (num - 1)) == 0

  • Pether replied 1 year ago

    Okay, thank you very much!