+ 7

# 12345 Puzzle! Try to solve!

Idea inspired from Agus Mei's quizzes! What is the result if all 5 digit numbers containing each of the digits 1,2,3,4,5 exactly once are added? Logic/Program solution should be given.

12th Apr 2017, 11:47 AM
Krishna Teja Yeluripati
+ 25
@Krishna Teja Yeluripati 5! = 120 numbers possible, if we'll sum numbers with mirrored digits (12345 and 54321, 51324 and 15342...) we get 66666 for each pair of numbers; 66666 * 60 = 3999960
12th Apr 2017, 12:13 PM
Illusive Man
+ 21
3999960
12th Apr 2017, 11:55 AM
Illusive Man
+ 14
A permutations problem. how fun.
12th Apr 2017, 1:03 PM
Ace
+ 10
5!=120 12345 +54321 120/2=60 ------------ 66666 66666 x60 ------------- 3,999,960
12th Apr 2017, 1:06 PM
Theprogrammers
+ 9
120/5=24 24*120=2880? Just a guess that's wrong.
12th Apr 2017, 12:59 PM
Theprogrammers
+ 7
Oh. :| I dont think my logic works with floating points
12th Apr 2017, 12:11 PM
Pixie
+ 7
@Illusive Man : Logical Solution. @Klaus-Dieter Warzecha - Program Solution. Well Done!
12th Apr 2017, 1:27 PM
Krishna Teja Yeluripati
12th Apr 2017, 12:20 PM
Pixie
+ 5
@Illusive man : Can you give the logic/program?
12th Apr 2017, 12:05 PM
Krishna Teja Yeluripati
+ 5
@Sweet Emotion : You are getting compilation error because maximum value of int is 32767.
12th Apr 2017, 12:09 PM
Krishna Teja Yeluripati
+ 3
If you prefer brute force and recognize that this is about permutations: https://code.sololearn.com/c30Msv90uSbA
12th Apr 2017, 1:00 PM
Klaus-Dieter Warzecha
+ 1
This is a great idea, give me some time, I think I can do it :)
12th Apr 2017, 12:14 PM
Dextozz