PROBLEM LINK:
Setter - Aghamarsh V
Editorial - Aghamarsh V
DIFFICULTY :
Cakewalk
PREREQUISITES :
PROBLEM :
Given two positive integers we need to output which number is grater as on mathematics on mars. Maths on mars states that the number with more number of 1's in its binary representation is grater than the other.
EXPLANATION :
- Convert the given two numbers to their equivalent binary representations.
- Count the number of one's (1's) in their respective binary forms.
- State which of the two numbers is grater . If 1's in the binary representation of one integer are grater than that of the other , it is said to be the grater of the two.
- If the two integers' binary forms have equal number of 1's, they are said to be equal.
SOLUTION :
Solution will be uploaded soon