Problem 47. Extract leading non-zero digit
Solution Stats
Problem Comments
-
3 Comments
I added some extra test cases to fail some of the bogus answers.
Amazing Law!!!!!!!!!!!!
I cannot understand the problem.
Solution Comments
-
1 Comment
Interesting. Looks like it failed due to some rounding issue.
-
1 Comment
Whats wrong here ?
-
1 Comment
This appears to be the best solution that doesn't use regexp
-
1 Comment
A good method. num2str
-
1 Comment
Sorry, I did not want to copy you! Just tried to understand what you did...
-
1 Comment
Doesn't work if x = 0.3000
-
1 Comment
The best solution n codesize for me and w/o cheating !
-
4 Comments
not fun at all :-)
bm, you have many good solutions in Cody. Why put in garbage like this?
You have just made me sad. Sorry.
i wrote this a long time ago (on the third day of Cody). i figured that as soon as the test suite was changed, this solution would be gone with the wind. sorry to anyone i offended :(
-
1 Comment
Doesn't work if x = 0.3000
-
1 Comment
Not general. Solution depends on the particular test case.
-
1 Comment
Doesn't work if x = 0.3000
Problem Recent Solvers1721
Suggested Problems
-
1011 Solvers
-
Back to basics 23 - Triangular matrix
781 Solvers
-
Find perfect placement of non-rotating dominoes (easier)
302 Solvers
-
Return unique values without sorting
822 Solvers
-
Permute diagonal and antidiagonal
294 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!