We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website. cookie policy and privacy policy.
 
+0  
 
0
50
3
avatar

A number is formed by writing the numbers 1 to 30 in order as shown.


12345678910111213..........2930


Simeon removed 45 of these 51 digits leaving 6 in their original order to make the largest 6-digit number possible. What is the this number?

 Nov 27, 2019

Best Answer 

 #1
avatar
+1

n=123456789101112131415161718192021222324252627282930;s=0;p=0;cycle: s=s+(n%10);p=p+1;n=int(n/10);if(n!=0, goto cycle,0);print"Total Sum =",s;print"Total Num =",p

 

920,212 - is the largest such number.

 Nov 27, 2019
 #1
avatar
+1
Best Answer

n=123456789101112131415161718192021222324252627282930;s=0;p=0;cycle: s=s+(n%10);p=p+1;n=int(n/10);if(n!=0, goto cycle,0);print"Total Sum =",s;print"Total Num =",p

 

920,212 - is the largest such number.

Guest Nov 27, 2019
 #2
avatar+978 
0

We want the earliest digits to be the biggest. Let's start with 9 since that's the biggest number.

9_____

Now, the only numbers left we can use are 10, 11, 12, etc. all the way to 30.

30 is the biggest one, so let's use that next.

930___

BUT WAIT! There are no digits greater than 30. So let's do 29.

929___

Then 30

92930_

Here, we run into a problem. The last digit must be a single digit, but there is no single-digit remaining. 

If we choose two one-digit numbers in the beginning, then it will work out.

 

Obviously, 8 and then 9 is the best option.

89____

Then, since 30 cannot be used after these two numbers, we must use 29 and then 30.

Therefore, 892930 is the answer.

 

You are very welcome!

:P

 Nov 27, 2019
 #3
avatar
0

CoolStuff: Where does your number 892930 appear in the above sequence "leaving 6 in their original order"?

 Nov 27, 2019

27 Online Users

avatar