The correct option is C 30
We will find the total number of 5-digit numbers that can be formed using the digits 2 and 1 only and remove the number which has all the digits same.
Now, for each of the place in 5-digit number we have 2 choices, hence the total number of 5-digit numbers are 25. out of these 32 number there are exactly two number namely 11111 and 22222 do not satisfy the given condition. Hence the total number of 5-digit numbers that can be made using the digits 1 and 2 and in which at least one digit is different is 32−2=30