Ultra_fast_mathematics

i have written the code where firsly it will convert it to a decimal the zor will be taken of each bit and it will be stored in an array…array will be printed…but test cases are failed .
https://ide.codingblocks.com/s/43830

You have missed endl after every test case and numbers can be very large so change int -> long long int.
Check this:
https://ide.codingblocks.com/s/43850

Also this can be solved in a very simple way.
Check out my code also :https://ide.codingblocks.com/s/43852

can it be done in less than O(N) where N is no of digits in a number

I dont think it can be solved in better complexity.