Sum of 256

The numbers 1 , 2 , 3 , 4 1,2,3,4 are used to create 256 256 different 4 4 digit numbers. Find the sum of all these numbers


The answer is 711040.

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
Jun 22, 2014

Because all the digits are occurring equal number of times in these numbers at any place (like unit, tens etc) , we can conclude that if we write all one below the other,

then each digit will occur 64 64 times in vertical column (:P column is vertical always though :P)

And 1 + 2 + 3 + 4 = 10 1+2+3+4 =10 , hence if you sum them all, for the unit's place, sum of digits will be 64 × 10 64\times 10 ,

for the ten's place will be 64 × 10 × 10 64\times 10\times 10 ,

similarly for the thousands place and also for hundred's.

Thus the answer is 64 × ( 10000 + 1000 + 100 + 10 ) = 64 × 11110 = 711040 64\times (10000+1000+100+10) =64 \times 11110 = \color{#D61F06}{\boxed{711040}}

Exactly the same way I did it! :)

Krishna Ar - 6 years, 11 months ago

Log in to reply

me too man :)..... nice problem!

Abhinav Raichur - 6 years, 11 months ago

Log in to reply

me too !!!

Rishabh Jain - 6 years, 11 months ago

got it at then of my 3 tries

Mardokay Mosazghi - 6 years, 11 months ago

How did you create a box around 711040??

Anuj Shikarkhane - 6 years, 10 months ago
Milind Joshi
Jun 21, 2014

In these 256 numbers minimum is 1111 and max is 4444......so avg is (1111+4444)/2.....and the sum of these numbers is 256*(1111+4444)/2=711040

That's nice, I did it in a different way though.

Krishna Ar - 6 years, 11 months ago

Log in to reply

In which way???...kindly can you give your solution...?

Milind Joshi - 6 years, 11 months ago

Log in to reply

My solution is exactly the same as Aditya's

Krishna Ar - 6 years, 11 months ago

This solution is awesome........................

Imrul Asik - 6 years, 11 months ago

man could you please elaborate and give a more general veiw with proof........ because thats easier than the method i used...........thanks :)

Abhinav Raichur - 6 years, 11 months ago

Log in to reply

Here 1st no is 1111 and last no is 4444...so add them both we get 1111+4444=5555 2nd no is 1112 and 2nd last is 4443 so addition is 1112+4443=5555....same as we get 1113+4442=5555....1114+4441=5555....1121+4434=5555....and so on upto 128 times as total nos are 256....so sum is 5555*128=711040....in my soln i have find avg and multiplied it by 256....

Milind Joshi - 6 years, 11 months ago

Log in to reply

oho i get it now.......... much like what gauss did to find the sum of first N natural numbers :) ... thanks

Abhinav Raichur - 6 years, 11 months ago
Bernardo Sulzbach
Jun 23, 2014

I know this is NT, but just to show a CS solution:

total = 0
for a in range(1, 5):
    for b in range(1, 5):
        for c in range(1, 5):
            for d in range(1, 5):
                total += d * 1000 + c * 100 + b * 10 + a
print(total)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...