+ 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
10 Respostas
+ 3
Like this?
Highest 7 digit number
https://code.sololearn.com/c3EzSaKXLCPt/?ref=app
+ 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
+ 8
@Kartik
Find a 7-digit numbers as you found 3-digit numbers
+ 8
@kartik exactly!
you see why digit 5 is impossible?
+ 6
Here's my try in Python
https://code.sololearn.com/czO4KxY8d1of/?ref=app
+ 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!
+ 3
I didn't understand what to take as input.
So, I have displayed all 3 digit numbers satisfying your specified properties.
+ 3
So, what else should I do in my code?
+ 3
Different digits!
+ 3
Given in challenge first line.