Ad
  • Custom User Avatar

    It's written in maths, not C#, so it expands to 1 <= n AND n <= 2^64-1. ( Python understands the a <= b <= c syntax like that, but lots of other languages require the AND. )

  • Custom User Avatar

    Which part of that do you not understand? ( Yes, it helps to be able to read that, so this is not a fatuous question. )

    ETA: Note that you can Google that exact phrase, and Google will explain it a bit, and offer a link to QuickMath whch will try to explain in more ways and different terms.

  • Custom User Avatar

    But you do, don't you? It's in the description.

  • Custom User Avatar

    They should tell you what input you failed on, unless there's a language without assertion messages that I missed.

  • Custom User Avatar

    It should mostly work. There's another thing to consider, but the test results will probably tell you that.

    The tests are correct!

  • Custom User Avatar

    A "power of 2" means 2^n for any n ( where n >= 0 ), so 1, 2, 4, 8, 16, ... See https://en.wikipedia.org/wiki/Exponentiation

    If the input can be written as the sum of exactly three of these numbers, return true. If it cannot, return false.

    Does this help?

  • Default User Avatar

    example: 9 -> 2^2 + 2^2 + 2^0
    It can be written as three 2^n then its true