← All problemsSign in

Count Pair

A chef was sitting one day and he thought that binary numbers are in the format 1 0 0 1. Then he thought of doing something out of the box and realized that he will count the pair of 1, 0 in a binary number that is he will count how many (1,0) are in the binary number or (0,1). For example, 1 0 1 1 0 0 1 contains 2 (1, 0) and 2 (0,1). Your task is to help the chef in performing the same. ### Inpu

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