we need to make a number code with 4 digits. how many codes have at least two equal digits? and how many codes have exactly 3 equal digits?