Question description
Problem Description: You might be surprised to know that 2013 is the first year since 1987 with distinct digits. The years 2014, 2015, 2016, 2017, 2018, 2019 each have distinct digits. 2012 does not have distinct digits, since the digit 2 is repeated. Given a year, what is the next year with distinct digits? Homework help – Write a function called distinctdigits(m), where 0≤m≤10000, with m representing the starting year will return the next year with distinct digits.Test your function with following inputs:distinctdigits(1987) OUTPUT: 2013distinctdigits(999) OUTPUT: 1023