Bine ai venit guest
 
User:
Pass:

[Creare cont]
[Am uitat parola]
iBac = materialul ULTRACOMPLET de pregătire pentru bac la mate. Dacă vrei poţi.
Forum pro-didactica.ro  [Căutare în forum]

[Subiect nou]   [Răspunde]
[1]
Autor Mesaj
dtiwari
Grup: membru
Mesaje: 55
14 Dec 2017, 14:23

[Trimite mesaj privat]

sum of numbers    [Editează]  [Citează] 

The sum of all
digit number that can be formed by using


Attempt: selecting
numbers from
is


help me



---
dtiwari
gigelmarga
Grup: membru
Mesaje: 1064
14 Dec 2017, 14:23

[Trimite mesaj privat]


There are 4*5*5=100 such 3 digit numbers (the first digit cannot be 0).

Each of 0,1,2,3,4 appears 4*5=20 times as the unit digit, adding up thus to 20*(0+1+2+3+4)=200.

Each of 0,1,2,3,4 appears 4*5=20 times as the tens digit, adding up thus to 20*(0+1+2+3+4)*10=2000.

Finally, Each of 1,2,3,4 appears 5*5=25 times as the hundreds digit, adding up thus to 25*(1+2+3+4)*100=25000.

Hence the sum of all numbers equals 200+2000+25000=27200.



w=Words([0,1,2,3,4],3)
s=0
for c in w:
if c[0]!=0:
s=s+int(str(c))
print s
27200

[1]


Legendă:  Access general  Conţine mesaje necitite  47495 membri, 58496 mesaje.
© 2007, 2008, 2009, 2010 Pro-Didactica.ρ