Adding 0 makes no change, Really ?

Given that in the 8-digit number A B C D E F G H \overline{\mathrm{ABCDEFGH}} ,

(i) A B C D = E F G H \overline{\mathrm{ABCD}}=\overline{\mathrm{EFGH}}
(ii) The numbers A B C D E F G H \overline{\mathrm{ABCDEFGH}} and A B C D 0 E F G H \overline{\mathrm{ABCD0EFGH}} are both divisible by 11 11 .
Let the sum of all possible values of A B C D E F G H \overline{\mathrm{ABCDEFGH}} be N N .

Find the digit sum of N N .


Details and assumptions :-

  • A B C \overline{\mathrm{ABC}} means the number in decimal representation with digits A , B , C A,B,C i.e. A B C = 100 A + 10 B + C \overline{\mathrm{ABC}} = \mathrm{100A+10B+C}
  • The letters A A to H H do not necessarily stand for distinct digits.
  • In the second number, the digit 0 0 is added in the middle of the 8-digit number, which makes it a 9-digit number.
  • Digit sum is sum of all digits in decimal representation, digit sum of 12023 12023 is 1 + 2 + 0 + 2 + 3 = 8 1+2+0+2+3=8
  • 00123 is not a 5-digit number.


The answer is 36.

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.

3 solutions

Aditya Raut
Oct 21, 2014

Because it's given that A B C D = E F G H \overline{ABCD}=\overline{EFGH} , we have

A B C D E F G H = A B C D A B C D = 10001 × A B C D \overline{ABCDEFGH} = \overline{ABCDABCD} = 10001\times \overline{ABCD} .

Because 11 10001 11 \nmid 10001 , we obtain that 11 A B C D 11 \mid\overline{ABCD} .


The A B C D 0 E F G H \overline{ABCD0EFGH} part is just a troll, because it will always be divisible by 11

A B C D 0 E F G H = A B C D 0 A B C D = A B C D × 100001 \overline{ABCD0EFGH} = \overline{ABCD0ABCD} = \overline{ABCD} \times 100001 and as 100001 100001 is divisible by 11, this is always divisible by 11 11 .


From this we conclude that A B C D \overline{ABCD} is a 4-digit number divisible by 11 11 , that is ( 1001 , 1012 , . . . . , 9999 ) (1001,1012,....,9999)

Hence sum of all the values of A B C D E F G H \overline{ABCDEFGH} is

10001 × k = 91 909 11 k = 10001 × ( 819 × 1001 + 9999 2 ) = 10001 × 4504500 = 45049504500 \displaystyle 10001\times \sum_{k=91}^{909} 11k \\ = 10001\times \biggl( 819 \times \dfrac{1001+9999}{2} \biggr)\\ = 10001\times 4504500 \\ = \color{#3D99F6}{\mathrm{45049504500}}

Digit sum of 45049504500 45049504500 is 36 \boxed{36}

Nice solution, same way here: except I used a slightly different summation

10001 0 818 11 x + 1001 10001\displaystyle \sum_0^{818} 11x+1001

Trevor Arashiro - 6 years, 7 months ago

@Aditya Raut as ,You said we could use python for this soo below is my python code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def sd(n):  #sum of digits
    s = 0
    while n:
        s += n % 10
        n /= 10
    return s
k=0
for a in range(1,10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                for e in range(10):
                    for f in range(10):
                        for g in range(10):
                            for h in range(10):
                                if (1000.0*a+100.0*b+10.0*c+1.0*d==1000.0*e+100.0*f+10.0*g+1.0*h) and (10**7*a+10**6*b+10**5*c+10**4*d+10**3*e+10**2*f+10**1*g+10**0*h)%(11.0) == 0:
                                    if (10**8*a+10**7*b+10**6*c+10**5*d+10**3*e+10**2*f+10**1*g+10**0*h) % (11.0) == 0:
                                        k+=(10**7*a+10**6*b+10**5*c+10**4*d+10**3*e+10**2*f+10**1*g+10**0*h)
print 'answer is',sd(k)

can u tell me yours, Aditya

Mehul Chaturvedi - 6 years, 2 months ago

Log in to reply

You want a programming solution? Here's the one that takes less than 1 second for giving the answer.... @Mehul Chaturvedi you will surely like this.... I have first made the integers into strings, then I added strings which is way easier and faster for the computer, then I converted the strings back to integers for checking divisibility by 11, and finally made all of them append to a list, asking sum of that list...

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
>>> a=[]
>>> b=[]
>>> c=[]
>>> for i in range(1000,10000):
    a.append(''.join(str(i)))

>>> for i in a:
    if int(i+i)%11==0 and int(i+'0'+i)%11==0:
        b.append(i+i)

>>> for i in b:
    c.append(int(i))


>>> sum(c)
45049504500L

Now easily get the sum of digits which is 36. Please read and contact if you don't understand something, this is way better than giving every letter all values and then checking loads of calculations you're gonna love this way...

Aditya Raut - 6 years, 2 months ago

I guess your program must have taken a lottttt time to give answer, also it is not bug free, it's not printed intended things

This is one inelegant way because the computer has to make lot calculations, for each letter 10 choices, then the * and + function, then == function.... Will post mine soon...

Aditya Raut - 6 years, 2 months ago

Log in to reply

No, @Aditya Raut It took just 1 minute

Mehul Chaturvedi - 6 years, 2 months ago

Log in to reply

@Mehul Chaturvedi 1 minute is way out of efficiency for a program of this kind man, this problem must get solution in maximum 5 seconds...

Aditya Raut - 6 years, 2 months ago

First of all, let me give you one more way of getting sum of digits, it is a hint towards my programming solution for the problem:-

1
2
3
4
5
6
7
8
9
def sd(n):
    li=[]
    x=''.join(str(n))
    for i in x:
        li.append(int(i))
    k=0
    for i in li:
        k+=i
    return k

@Mehul Chaturvedi

Aditya Raut - 6 years, 2 months ago

Log in to reply

@Aditya Raut I just know basic commands in Python ,therefore my solution was long....would you suggest me some source from where i can learn python,or from where did u learn. And please check the message on slack

Mehul Chaturvedi - 6 years, 2 months ago

Its easy for me to visualize the concept, but not the summation, so here's python brute force

for i i in range( 1000 1000 , 10000 ,10000 ):

x = i 10000 + i x=i*10000 + i

i f ( ( x / 11 ) = = x / 11. ) : if ((x/11)==x/11.):

      z+=x

print z z

then do digit sum in head :)

K T
Mar 4, 2019

From(ii) it follows that the difference 90000 × A B C D 90000×\overline{ABCD} must also be divisible by 11. Because 90000 and 11 are coprime, A B C D \overline{ABCD} itself must be divisible by 11.

Multiples of 11 that form 4-digit numbers are 91 × 11 = 1001 , 92 × 11 , . . . through 909 × 11 = 9999 91×11=1001, 92×11, ... \text{through } 909×11=9999 .

The sum of all these is 11 × ( 91 + 92 + . . . + 909 ) = 11 × ( 909 + 91 ) × ( 909 91 + 1 ) 2 = 4504500 11×(91+92+...+909)=11×\frac{(909+91)×(909-91+1)}{2}=4504500 .

The sum of all A B C D A B C D \overline{ABCDABCD} then is 10001 times this, so 45049504500 of which the digit sum is 36 \boxed{36} .

Note: I misread the question first, so I calculated N itself.

Im 7th grade and i fon't understend furst part when u said "comprime" can u help plz haha

Syio t - 2 years ago

'Coprime' means the same as 'relative prime'. Saying a and b are coprime is equivalent to saying gcd(a,b)=1. The only factor they share is 1.

K T - 2 years ago

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...