Find the sum of all the numbers greater than 10000 formed with the digits 0, 2, 4, 6 and 8.
Digits are not repeated.
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.
Since, this may go really messy, I would solve this question step by step, So please bear with me!
For Ones place:
When an 8 is placed, the total amount of numbers formed = 3 × 3 × 2 × 1 = 1 8
When a 6 is placed, the total amount of numbers formed = 3 × 3 × 2 × 1 = 1 8
When a 4 is placed, the total amount of numbers formed = 3 × 3 × 2 × 1 = 1 8
When a 2 is placed, the total amount of numbers formed = 3 × 3 × 2 × 1 = 1 8
When a 0 is placed, the total amount of numbers formed = 4 × 3 × 2 × 1 = 2 4
Sum at one's place = ( 8 + 6 + 4 + 2 ) 1 8 + ( 0 ) 2 4 = 2 0 × 1 8 --------- 1 .
This same pattern will be followed for the ten's, the hundred's and the thousand's place. So, using the same formula:
Sum at ten's place = ( ( 8 + 6 + 4 + 2 ) 1 8 + ( 0 ) 2 4 ) × 1 0 = 2 0 0 × 1 8 ----------- 2 .
Sum at hundred's place = ( ( 8 + 6 + 4 + 2 ) 1 8 + ( 0 ) 2 4 ) × 1 0 0 = 2 0 0 0 × 1 8 ----------- 3 .
Sum at thousand's place = ( ( 8 + 6 + 4 + 2 ) 1 8 + ( 0 ) 2 4 ) × 1 0 0 0 = 2 0 0 0 0 × 1 8 ----------- 4 .
Now for the ten thousand's place:
When an 8 is placed, the total amount of numbers formed = 4 × 3 × 2 × 1 = 2 4
When a 6 is placed, the total amount of numbers formed = 4 × 3 × 2 × 1 = 2 4
When a 4 is placed, the total amount of numbers formed = 4 × 3 × 2 × 1 = 2 4
When a 2 is placed, the total amount of numbers formed = 4 × 3 × 2 × 1 = 2 4
Sum at ten thousand's place = ( ( 8 + 6 + 4 + 2 ) × 2 4 ) × 1 0 0 0 0 = 2 0 0 0 0 × 2 4 ------------- 5 .
Total sum = 1 . + 2 . + 3 . + 4 . + 5 .
= 3 6 0 + 3 6 0 0 + 3 6 0 0 0 + 3 6 0 0 0 0 + 4 8 0 0 0 0 0
= 3 6 × ( 1 0 + 1 0 0 + 1 0 0 0 + 1 0 0 0 0 ) + 4 8 0 0 0 0 0
= 3 6 × ( 1 1 1 1 0 ) + 4 8 0 0 0 0 0
= 3 9 9 9 6 0 + 4 8 0 0 0 0 0
= 5 1 9 9 9 6 0
CHEERS!:)
YO!! I did it exactly the same way!
Log in to reply
Haha...Well done @shuvayan ghosh dastidar !!:D:D
De acordo com a permutação simples, teríamos 5 ! possibilidades de números distintos com 5 dígitos diferentes, porém um desses é 0 , que à esquerda não vale nada, logo o total passa a ser 4 ∗ 4 ∗ 3 ∗ 2 ∗ 1 = 9 6 números. Agora vem a parte mais chatinha, pois precisamos descobrir a soma dos mesmos.
Partindo das unidades, escolhemos qualquer algorismo para ser fixo a fim de teste, por exemplo o 2 :
? ? ? ? 2
Novamente relembrando, como 0 não pode ser o primeiro dígito, temos 3 ∗ 3 ∗ 2 ∗ 1 = 1 8 números que terminam em 2 . Assim, 1 8 ∗ 2 é a soma de todas as casas decimais de valor 2 .
Repetimos o procedimento para todos os outros dígitos, então temos que a soma de todas as casas decimais dos 96 números é:
1 8 ∗ 2 + 1 8 ∗ 4 + 1 8 ∗ 6 + 1 8 ∗ 8
ou
1 8 ( 2 + 4 + 6 + 8 ) = 3 6 0 = 3 6 ∗ 1 0
O procedimento para as demais casas dos números é bastante similar, apenas utilizamos a potência de 10 para ajustar o valor real da sua posição.
1 8 ∗ 2 0 ∗ 1 0 = 3 . 6 0 0 = 3 6 ∗ 1 0 2
1 8 ∗ 2 0 ∗ 1 0 2 = 3 6 . 0 0 0 = 3 6 ∗ 1 0 3
1 8 ∗ 2 0 ∗ 1 0 3 = 3 6 0 . 0 0 0 = 3 6 ∗ 1 0 4
Até agora já calculamos o valor de 1 8 ∗ 4 números, faltam os terminados em 0 .
Sendo esse o último dígito, teríamos mais números, pois desse modo garantíamos que ele não seria o primeiro, e assim teremos apenas números válidos para a condição de valor > 1 0 . 0 0 0 .
? ? ? ? 0
4 ∗ 3 ∗ 2 ∗ 1 = 2 4
Logo,
2 4 ∗ 2 0 ∗ 1 0 4 = 4 . 8 0 0 . 0 0 0
Agora somamos tudo
4 . 8 0 0 . 0 0 0 + 3 6 ∗ 1 1 . 1 1 0 = 5 . 1 9 9 . 9 6 0
:) Espero ter ajudado, abraços!
Python:
1 2 3 4 5 6 7 |
|
Whenever I've seen a solution by you, why has it always been Python ?
Log in to reply
Because it's my favorite way to solve things. I use this site mainly to practice my programming. I'm not great at traditional mathematical thinking, so I get around that problem with Python.
I know it's not a good idea to use Python as a crutch, but I enjoy it. :D
Log in to reply
where can i learn python ????? cuz i want to
Log in to reply
@Vaibhav Prasad – Here you go:
Learn Python the Hard Way: http://learnpythonthehardway.org/book/
MIT's Introduction to Python: https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-0#.VNtP4np6jqA
MIT's Introduction to Algorithms: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/
The Python documentation is also very thorough: https://docs.python.org/2.7/
If you have any questions, don't hesisitate to ask:
brockrbrown@gmail.com
Log in to reply
@Brock Brown – whoa....ok. thanks a lot
Problem Loading...
Note Loading...
Set Loading...
Sum of all numbers formed using digits 0 , 2 , 4 , 6 & 8 = ( 0 + 2 + 4 + 6 + 8 ) × ( 4 ! ) × ( 1 1 1 1 1 ) = 5 3 3 3 2 8 0
sum of all numbers formed by given digits which are less than 1 0 0 0 0 a l l 4 d i g i t n u m b e r s = ( 2 + 4 + 6 + 8 ) × ( 3 ! ) × ( 1 1 1 1 ) = 1 3 3 3 2 0
Hence required sum = ( 5 3 3 3 2 8 0 ) − ( 1 3 3 3 2 0 ) = 5 1 9 9 9 6 0