+ 10

[challenge] weekend brainer for runaways

Find highest number with different digits except 0 and following property: If you delete any digit, the remaining number must be devisible by that digit. Example 124: 4,2,1 are different digits If 1 is deleted: 1 is devisor of 24 if 2 is deleted: 2 is devisor of 14 if 4 is deleted: 4 is devisor of 12 With thinking the runtime is not too high Have fun all languages are welcome

1st Dec 2017, 12:31 PM
Oma Falk
Oma Falk - avatar
10 Respuestas
+ 3
Like this? Highest 7 digit number https://code.sololearn.com/c3EzSaKXLCPt/?ref=app
1st Dec 2017, 2:10 PM
Kartik
Kartik - avatar
+ 8
@Kartik no input required just find the highest number with this property your first try is perfect for three numbers. the highest possible number has 7 digits
1st Dec 2017, 1:46 PM
Oma Falk
Oma Falk - avatar
+ 8
@Kartik Find a 7-digit numbers as you found 3-digit numbers
1st Dec 2017, 2:02 PM
Oma Falk
Oma Falk - avatar
+ 8
@kartik exactly! you see why digit 5 is impossible?
1st Dec 2017, 2:15 PM
Oma Falk
Oma Falk - avatar
1st Dec 2017, 1:11 PM
Kartik
Kartik - avatar
+ 4
@Batman Yes 5 is not possible in any case as 0 cannot be present And 5 can only divide numbers ending with 5 or 0!
1st Dec 2017, 2:16 PM
Kartik
Kartik - avatar
+ 3
I didn't understand what to take as input. So, I have displayed all 3 digit numbers satisfying your specified properties.
1st Dec 2017, 1:12 PM
Kartik
Kartik - avatar
+ 3
So, what else should I do in my code?
1st Dec 2017, 1:40 PM
Kartik
Kartik - avatar
+ 3
Different digits!
1st Dec 2017, 4:13 PM
Kartik
Kartik - avatar
+ 3
Given in challenge first line.
1st Dec 2017, 4:14 PM
Kartik
Kartik - avatar