190k views
5 votes
A number is called evil if it has 666 in it. How many 7 digit numbers are evil?

1 Answer

3 votes

Explanation:

There are 5 different positions of 666:

666////

/666///

//666//

///666/

////666

The forward dashes represent any number from 0 to 9.

Case 1: "666////"

Number of ways = 10⁴ = 10,000.

Case 2: The other positions.

Since the 1st forward dash cannot be 0 (leading digit),

Number of ways for each position = 9 * 10³ = 9,000

Number of ways for all 4 positions = 9,000 * 4 = 36,000.

Total evil numbers = 10,000 + 36,000 = 46,000.

User Dethariel
by
4.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.