If you rotate a sheet of paper by 180 degrees, digits 0, 1, and 8 do not change; 6 becomes a 9; 9 becomes a 6; while other digits lose their meaning. Count all the 7-digit numbers that do not change upon rotation by 180 degrees.
If the 6-9 thing counts AND you cannot have leading zeroes, you have 5 choices for each position in your 7 digit positions (except there can be no leading zero)
4 x 5 x 5 x 5 x 5 x 5 x 5 = 5^6 x 4 =......
If you cannot have a leading zero, there are 4 choices (1, 8, 6, 9) for the first digit.
The second digit can be any of the 5 digits (0, 1, 8, 6, 9).
The third digit can also be any of the 5 digits.
The fourth digit can be any of these 3: (0, 1, 8).
The fifth digit is determined by the choiice for the third digit; so are digits six and seven.
ou get 4 x 5 x 5 x 3 choices.