What is the number of positive integers less than or equal to 2017 that have at least one pair of adjacent?
Answers
Answer:
738
Step By Step Explaination:
Number should be at least 2 digits
2 digits numbers starting & ending with even number
Starting digits 2 , 4 , 6 , 8 Ending digit 0 2 , 4 , 6 , 8
4 * 5 = 20 numbers
3 Digit numbers
its necessary that Middle number is even number
0 2 4 6 8
1st digit even number 2 4 , 6 , 8 & 3rd digit any digit
5 * 4 * 10 = 200
3rd digit even number 0 2 4 6 8 & 1st digit any ( 1 to 9)
= 5 * 5 * 9 = 225
Repeated number here where 1st & 3rd digit even numbers
4 * 5 * 5 = 100 ( to be reduced)
3 Digit numbers = 200 + 225 - 100 = 325
in 4 digit number 1000 to 1999
1100 to 1999 again these 325 numbers & additional 50 numbers where 2nd digit = 0 (1000 to 1099)
= 325 + 50 = 375 numbers
2000 to 2017 (1st two digits are even)
All 18 numbers
Total number = 20 + 325 + 375 + 18 = 738
Hence, the answer is 738.