Casting 9's into 100

When we write the integers from 1 to 100, how many times does the digit 9 appear?

10 20 19 11

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Discussions for this problem are now closed

Darius Drago
Nov 1, 2014

there are 192 digits from 1 to 100 ( 100 numbers, 90 with 2 digits, one with 3 digits, and 9 with one --> 192 digits , 11 are zero's, and 1 extra "1" in 100 =12 digits to subtract from 192, and that leaves 180 digits divided among 9 digits (1 to 9)-->20 each

This is a list of the numbers that include the digit 9, 9, 19, 29, 39, 49, 59, 69, 79, 89, 90, 91, 92. 93, 94, 95, 96, 97, 98, 99

There a total of 19 numbers, the digit 9 appeared once in 18 of the numbers, and it appeared twice in 1 of the number

Notice that the digit 9 appears twice in 99, and once in the others? ;)

A Former Brilliant Member - 6 years, 7 months ago

you included two 9's. may I ask why?

Shivam Ganguly - 6 years, 7 months ago

I didn't even think The two 9's in 99 would count

brittany gutknecht - 6 years, 7 months ago

I am sorry you need to add 90 91 92 93 94 95 96 97 98 which is 9. Added to eleven produces 20. Another way to give the solution is to say each digit appears 9 times to the riight of other digits. Add to that when it will be to the left of other digits like e,g. For the four 41 42 ...44 . 49. Which is 11 times. Add 9 and 11 you get your 20.

Samir Shaheen - 6 years, 7 months ago

nice ansewr

Mohsan Jarral - 6 years, 7 months ago

In fact it is 11. Namely 9 19 29 39 49 59 69 79 89 99. I do not know why the answer is 20.

Samir Shaheen - 6 years, 7 months ago

9 19 29 39 49 59 69 79 89 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 (twice in 99)

Jahanzeb Ikram - 6 years, 7 months ago

90, 91,9 92 93 94 95 96 97 98 will also be added

Priyansh Choudhary - 6 years, 7 months ago

u missed 91-98 which also has 9 digit

Pratik Singhal - 6 years, 7 months ago

91 92 93 94 95 96 97 98 sums its all up

Haziq Iskandar - 6 years, 7 months ago
Brock Brown
Dec 27, 2014
1
2
3
4
5
6
total = 0
for i in xrange(1,101):
    for digit in str(i):
        if digit == '9':
            total += 1
print total

Vladan Gajić
Nov 8, 2014

Assume that all numbers are with two digits 00.01,...,99 (zero 9's in 100 so dont count that number). 100 numbers * 2 digits = 200 digits. There is 10 digits, therefore each digit is shown 20 times.

Benedict Almeda
Nov 6, 2014

From 1 to 100, the number of occurences '9' would appear

  • in ones digits: 10 (that is X9; X runs from 0 to 9)

  • in tens digits: 10 (90, 91, ... 99)

Hence, total occurence of '9' is 20.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...