XORing them
CodeChefOpen on judge ↗
Some integers satisfy following condition: They can be represented as sum of two or more consecutive positive integers. I will name this condition as 'beautiful' in further statement. For instance, 10 can be represented as sum of 1+2+3+4. Given an integer N, find XOR of Nth integer that satisfies the beautiful condition with the maximum number smaller than this Nth integer that does not sa
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start