Problem 34. Binary numbers
40.19% Correct | 59.81% Incorrect
Last Solution submitted on Jun 01, 2023
Show 7 older comments
Jigar Gada on 10 Nov 2012
matlab functions should not be allowed. Let people think of the solution from scratch.
Jon on 18 Nov 2013
I actually use a function to do this in my project, but my original code scored 47.
MDK on 21 Oct 2014
I had all the test cases working properly except for n=10!
This is very weird!!
Gareth Lee on 10 Nov 2014
when n = 3;
A = binary_numbers(n);
assert(all(A(:) == 0 | A(:) == 1))
Sanzhar Askaruly on 3 Jul 2019
Anton Casas on 25 Oct 2020
Very fun problem!
akihisa yorozu on 21 Aug 2021
More difficult than I expected!
Panggah Prabawa on 4 Jul 2022
There was a guy who solved this problem with around 11k code size. Absolute madlad.
Anudeep on 9 Nov 2022
Riya on 10 Nov 2022
difficult that I intended it to be.
Solution CommentsShow comments
Problem Recent Solvers3839
Side of an equilateral triangle
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!