Skip to main content
5 of 7
added 25 characters in body
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

#Japt, 29 11 bytes

Uo ®¤¬r@X^Y 

Try it online!

Outputs directly as an array, which saves about 4 bytes.

###Ungolfed and explanation

Uo ® ¤ ¬ r@ X^Y Uo mZ{Zs2 q rXY{X^Y}} // Implicit: U = input number Uo // Create an array of integers in the range `[0, U)`. mZ{Zs2 // Map each item Z in this range to Z.toString(2), q rXY{ // split into chars, and reduced by X^Y}} // XORing. // This returns (number of 1s in the binary string) % 2. // Implicit: output last expression 
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241