Are you smarter than a 5th grader- Part 8

An ascending integer is one in which each digit is greater than any other digit preceding it. How many ascending integers are there between 200 and 300?


The answer is 21.

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.

7 solutions

Avi Aryan
Jun 6, 2014

If in the tens place we have 3 3 we will have 6 6 choices for the unit place (4,5,6,7,8,9).
If we have 4 4 , we will have 5 5 choices.
...
If we have 8 8 , we will have 1 1 choice.


Total ways = 6 ( 6 + 1 ) 2 = 21 \frac {6(6+1)}{2} = 21

I did the same.

Jon Pentland - 7 years ago

solved the same way :)

Anik Mandal
Jun 5, 2014

There are 21 ascending integers namely:234,235,236,237,238,239,245,246,247,248,249,256,257,258, 259,267,268,269,278,279 and 289 .

can u pls elaborate the solution?

rahul ranjan - 7 years ago

This is not a solution!

Krishna Ar - 6 years, 12 months ago
Parth Lohomi
Jun 24, 2014

234 ,235,236,237,238,239....total 6 similarly next in the 245 row it come out total of 5....(trick is to subtract last digit from 10 i.e 10-5 is 5 so total numbers are 5) like this finally it comes out to be in total in 256 row 4 in 267 row 3 in 278 row 2 in 189 row 2 and in 289 row 1 so sum 1 +2+3+4+5+6 is 21

Zakaria Sellami
Jun 19, 2014

This question is not well asked, the term "preceding" is ambiguous, can't tell if it means from left to right or right to left, or maybe both! In that last case there would be 22 solutions.
Anyway thanks for sharing!

Bernardo Sulzbach
Jun 22, 2014

Python solution:

counter = 0
for number in [list(str(number)) for number in range(200, 301)]:
    if number[0] < number[1] < number[2]:
        counter += 1
print(counter)
Krishna Ramesh
Jun 14, 2014

Here's my method: Since the hundred's place is 2, an ascending integer cannot be within 200-233. the first number is 234.

So, within 230-240, there are 6 numbers: 234,235,236,237,238,239.

within 240-250,there are 5 numbers: 245,246,247,248,249.

this pattern goes on till 280-290, where there is only one:289.

there is obviously no ascending integer in 290-300.

So, the final answer is =6+5+4+3+2+1=21.

Can be done with hand but some Mathematica Code:

Ascending[x_] := 
 IntegerDigits[x][[1]] < IntegerDigits[x][[2]] < IntegerDigits[x][[3]]
Select[Range[200, 300], Ascending]

Returns:

{234, 235, 236, 237, 238, 239, 245, 246, 247, 248, 249, 256, 257, 
258, 259, 267, 268, 269, 278, 279, 289}

Thus, there are 21 such integers.

:)

wtf did u just write? can you please explain

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...