UVa 10019 - Funny Encryption Method

10019 - Funny Encryption Method

 * http://acm.uva.es/p/v100/10019.html

Summary
Given a decimal number figure out the number of 1's in its binary representation and the number of 1's in the hexadecimal representation.

Explanation
Calculating the decimal number is simple. Just continually bitshift until the number is zero. For the hexadecimal representation just parse each digit individually.

Input
3 265 111 1234

Output
3 5 6 3 5 5