Encryption Method
CodeChefOpen on judge ↗
A student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps: Example 1. Read the number N to encrypt : M = 265 2. Interpret N as a decimal number : X1 = 265 (decimal) 3. Convert the decimal interpretation of N to its binary representation : X1 = 100001001 (binary) 4. Let b1 be equal to the number of 1’s in this binary representa
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