Good-Bad Pair
CodeChefOpen on judge ↗
A pair of number is said to be “good” if the number of ones and zeros in their binary representation is same (neglecting leading zeros). Else it is a “bad”. You need to print the type of the pair. ###Input: - Two numbers ‘a’ and ‘b’. ###Output: Print “good” or “bad”. ###Constraints - $1 \leq a,b \leq 1000$ ###Sample Input 1: 5 6 ###Sample Output 1: good ###EXPLANATION: 5=> 101 and 6=
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