First > second

How many 2 2 digit positive integers have the property that the first digit is greater in value than the second digit?


The answer is 45.

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.

5 solutions

Vaibhav Prasad
Feb 27, 2015

10 = 1 10 = 1

20 , 21 = 2 20, 21 = 2

30 , 31 , 32 = 3 30, 31, 32 = 3

Since we are taking two digit numbers, we go up to 99 99 and get 9 9 such numbers.

Thus 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45 1+2+3+4+5+6+7+8+9 = 45

Caleb Townsend
Mar 1, 2015

The answer is T 9 = 1 2 ( 9 ) ( 9 + 1 ) = 45 T_9 = \frac{1}{2}(9) (9+1) = \boxed{45} This is because there are n n satisfactory numbers when the tens digit is equal to n . n.

Where can I learn how to derive such a interesting equation?

Michael Bruce - 5 years, 9 months ago
Brock Brown
Feb 27, 2015

Python:

1
2
3
4
5
6
count = 0
for n in xrange(10,100):
    s = str(n)
    if int(s[0]) > int(s[1]):
        count += 1
print "Answer:", count

There is just 1 digit lesser than 1 i.e. 0. So, the 2-digit number 10 follows this criteria.

There are 2 digits less than 2 i.e. 1 and 0. So, 20 and 21 follow the criteria.

Hence, there is 1 number starting with 1, 2 numbers starting with 2 and so on. So, sum of such numbers =1+2+3+4+5+6+7+8+9=45

Hrithik Carsane
Mar 11, 2015

for each n from 1 to 9 there are n choices for y, the second digit. e.g. 9, the second digit can be 0,1,2,3,4,5,6,7,8 = 9 choices.

so 1+2+3+4+5+6+7+8 +9 = 45

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...