BITCNTR - Bit counts
You are a detective working with Scotland Yard on a high-profile bank robbery case. The robber has left some trails in the form of numbers, which you believe will give you important clues about the robbery. Since you are genius, you know that the clues can obtained by converting the number in binary and counting the number of 1's.
The first line has a number t followed by t lines. Each line contains a number < 512.
Output t lines corresponding to each number, such that each of the line contains the clue obtained from the number.
|Added by:||Siddharth Kothari|
|Cluster:||Cube (Intel Pentium G860 3GHz)|
(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
Seems that if BF code length is too long it'll increase memory usage and slow down the running time. Before I submit my code, I predict that my code will be 0.00s (Because I hardcoded all possible answer and just simply print the answer to stdout) and using 1.6M mem usage (because I only use max 5 BF cell on this problem). But in fact it's not like that.. My code run in 0.36s and using 2.5M memory usage.. Seems that the running time of (preprocess) on bff interpreter is also counted too.. and mem usage is not only BF cell used but also compiled BF code length, just like my own BF interpreter used on BFK_AUTO problem.
very simple bitmask problem :D
That is, a number satisfying 0<= number < 512