nice soln kalyan[1]
Find the number of n digit numbers ,which have no two consecutive digits being same
ans=9n
-
UP 0 DOWN 0 0 3
3 Answers
Kalyan Pilla
·2009-09-13 11:43:04
An n digit number cannot have its first digit 0,
So the first digit can be chosen in 9 ways,
the second digit can be 0, but not the same as the first one, so it can be chosen in 9 ways,
The third digit may be 0if the second is not 0, but not same as the second, even this can be chosen chosen in 9 ways, the same follows for any number of numbers.
So each digit can be chosen in 9 ways
Hence n digits can be chosen in 9n ways!!