Counter game

  • + 0 comments

    public static String counterGame(long n) { int bits = Long.bitCount(n); int trailingZeros = Long.numberOfTrailingZeros(n);

        return (bits - 1 + trailingZeros) % 2 == 0 ? "Richard" : "Louise";
    

    } `