← All problemsSign in

XOR POWER

A number is called a UNIQUE if that number when represented as powers of 3 then XOR ($\oplus$) of all the exponents should be zero. While representing a number in the powers of 3, priorities are given to the larger powers of 3 and take every exponent in the XOR sum. For example: - $20 = 3^2 + 3^2 + 3^0 + 3^0$ $(2\oplus2\oplus0\oplus0 = 0)$ - $61 = 3^3 + 3^3 + 3^1 + 3^1 + 3^0$ $(3\oplus3

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start