Problem 1162. Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits. Write a MATLAB function that, when given a start year and an end year, will tell you how many of the years between these two values have four unique digits. You may assume that the years will only have four digits, and that the start year will be smaller than the end year.
For example: if start=1000 and finish=1023, your output should be 1, as 1023 is the only year in that range that has four unique digits.
Solution Stats
Problem Comments
-
3 Comments
we learn everyday something with CODY!
This problem needs to be fixed!!!!!!
Now that I've noticed people were having issues with this problem (thanks it it being added to the "Magic Numbers II" group) I've fixed the test suite. Cody changed the way their test suites were read in sometime in October, 2016 judging from when things went south. Those changes messed up this problem. I manually rescored a couple of solutions to confirm that the fixes worked, and they did. The problem is now functional.
Solution Comments
Show commentsProblem Recent Solvers185
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6375 Solvers
-
Remove the polynomials that have positive real elements of their roots.
1705 Solvers
-
Return the first and last characters of a character array
10530 Solvers
-
422 Solvers
-
520 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!