LeetCode:计算给定数字其前面所有二进制中1的数目
Given a non negative integer number num.For every numbers i in the range 0<=i<=numcalculate the number of 1's in their binary representation and return them as an array.Example 1:Input:2Output:[0,1,1]Example 2:Input:5Output:[0,1,1,2,1,