Problem 1226. Non-zero bits in 10^n.
Solution Stats
Problem Comments
-
2 Comments
Peter Wittenberg
on 28 Jan 2013
I can't get the last three cases to work out. I've checked the answers a couple of different ways. I still get 26 1s in the binary for 10^100. Is there a defect in the solutions offered?
SK
on 30 Jan 2013
The test cases are correct. In case you are using dec2bin, it is subject to loss of significance.
Problem Recent Solvers34
Suggested Problems
-
3313 Solvers
-
948 Solvers
-
Convert a numerical matrix into a cell array of strings
935 Solvers
-
Vectorizing, too easy or too hard?
132 Solvers
-
Determine if input is a Narcissistic number
145 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!