Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.
执行用时 :152 ms, 在所有 C++ 提交中击败了8.83%的用户 内存消耗 :9.9 MB, 在所有 C++ 提交中击败了3.54%的用户
执行用时 :84 ms, 在所有 C++ 提交中击败了67.28%的用户 内存消耗 :10.8 MB, 在所有 C++ 提交中击败了5.19%的用户