Cool Combinations!

We have a five digit positive integer N N . We select every pair of digits of N N (still retaining their relative order) and arrange them in numerical order to obtain 10 numbers: 33 , 37 , 37 , 37 , 38 , 73 , 77 , 78 , 83 , 87 33,37,37,37,38,73,77,78,83,87 . Find N N .


The answer is 37837.

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.

2 solutions

Pranjal Jain
Dec 10, 2014

From 33 and 77, it is clear that there are 2 "3" and 2 "7" with 1 "8".

Now the main task is to arrange them.

Sine 78 and 87 both are present, 8 must be in middle of both 7.

_____7______8_______7_____ \color{#3D99F6}{\text{\_\_\_\_\_7\_\_\_\_\_\_8\_\_\_\_\_\_\_7\_\_\_\_\_}}

Now 83 and 38 are present, so 3 will be in opposite side.

_____3______8_______3_____ \color{#3D99F6}{\text{\_\_\_\_\_3\_\_\_\_\_\_8\_\_\_\_\_\_\_3\_\_\_\_\_}}

There is no 73, which implies 7 will be at last and number would start from 3.

3___7____8____3_____7 \color{#3D99F6}{\text{3\_\_\_7\_\_\_\_8\_\_\_\_3\_\_\_\_\_7}}

This ends the puzzle. The number is 37837 \color{#D61F06}{\boxed{37837}}

I did the same... :)

Vaibhav Prasad - 6 years, 3 months ago
Brock Brown
Mar 28, 2015

Python 2.7:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pairs_of_N = [33,37,37,37,38,73,77,78,83,87]
def pairs(n):
    digits = str(n)
    n_pairs = []
    for i_1 in xrange(len(digits)):
        for i_2 in xrange(len(digits)):
            if i_1 < i_2:
                n_pairs.append(int(digits[i_1]+digits[i_2]))
    n_pairs.sort()
    return n_pairs
n = 1
while pairs(n) != pairs_of_N:
    n += 1
print "Answer:", n

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...