Vasina distance between numbers
Very easy
Execution time limit is 0.1 seconds
Runtime memory usage limit is 8 megabytes
Vasya has come up with his own way to measure the distance between numbers. He defines Vasya's distance as the number of differing digits in the binary representations of two numbers.
For example, consider the illustration provided:
In this image, the differing binary digits that contribute to Vasya's distance are marked in red.
Your task is to write a program that computes Vasya's distance between two non-negative integers.
Input
The input consists of a single line containing two non-negative integers A and B (0 ≤ A, B ≤ 10^9), separated by a space.
Output
Output a single integer on a single line, representing the calculated Vasya's distance.
Examples
Input #1
Answer #1
Submissions 889
Acceptance rate 34%