Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1162. Happy 2013...

Created by James

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.

Problem Group

Solution Statistics

52 correct solutions 16 incorrect solutions
Last solution submitted on Mar 21, 2014

Problem Comments