Math, asked by surendrakumarsingh58, 1 month ago

how many times would the digits 2,be written if you wrote down all the whole numbers from 1 to 100.​

Answers

Answered by nsnaruka1980
0

Answer:

Input : 22 Output : 6 Explanation: Total 2s that appear as digit from 0 to 22 are (2, 12, 20, 21, 22); Input : 100 Output : 20 Explanation: total 2's comes between 0 to 100 are (2, 12, 20, 21, 22..29, 32, 42, 52, 62, 72, 82, 92); Recommended: Please solve it on “PRACTICE” first, before moving on to the solution.

Answered by anujk124753
0

Answer:

There is only one number with 3 “2”s in it, namely 222. So that is three twos so far. There are 3 ways to have two “2”s. The digit that is not a two can be in the first, second or third position. The non-“2” digit can be one of 9 numbers namely 0,1,3,4,5,6,7,8 or 9. So there are 9*3=27 numbers containing two “2”s making 54 more twos. We are now up to 57 twos.

Similar questions