Skip to content

Latest commit

 

History

History

binary-sxore

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Given a number n we will define it's sXORe to be 0 XOR 1 XOR 2 ... XOR n where XOR is the bitwise XOR operator.

Write a function that takes n and returns it's sXORe.

Examples

n sXORe n
0 0
1 1
50 51
1000000 1000000