A Riddle!

DJediMaster

Senior member
Dec 27, 2000
569
0
0
There is a nine digit number with each of the digits from 1 to 9 appearing once. The whole number is divisible by 9. If you remove the rightmost number, the remaining 8 digit number is divisible by 8. Remove the rightmost number again and the remaining 7 digit number is divisible by 7. This pattern continues right down to a single digit. What is the number?
 

yoda291

Diamond Member
Aug 11, 2001
5,079
0
0


<< Dammit! My calculator only goes up to 8 digits.... Oh well, I give up. >>



Start->programs->accessories->calculator
 

jpsj82

Senior member
Oct 30, 2000
958
0
0
is this possible - i got a number that works for everything but 8. anyone get this?
edit: actually i have two numbers that work for everything but 8.
 

jpsj82

Senior member
Oct 30, 2000
958
0
0


<< Yes there is a legit solution. I'll post the answer in a couple of hours if no-one gets it. >>

ok, let me check my work.
 

isasir

Diamond Member
Aug 8, 2000
8,609
0
0
Is there only one answer to this, or are there multiple answers?




<< Dammit! My calculator only goes up to 8 digits.... Oh well, I give up.

Start->programs->accessories->calculator
>>



Yeah I know. My answer was basically a cop-out, cuz I didn't think I'd spend the time to figure this out. I'm using Excel actually instead. :)

 

b0mbrman

Lifer
Jun 1, 2001
29,470
1
81
var cal
var x

for (x = 100000001; x < 999999999; x++) {

if (x/9 == floor(x/9)) {
if (floor(x/10)/8 == floor(floor(x/10)/8)) {
if (floor(x/100)/7 == floor(floor(x/100)/7)) {
if (floor(x/1000)/6 == floor(floor(x/1000)/6)) {
if (floor(x/10000)/5 == floor(floor(x/10000)/5)) {
if (floor(x/100000)/4 == floor(floor(x/100000)/4)) {
if (floor(x/1000000)/3 == floor(floor(x/1000000)/3)) {
if (floor(x/10000000)/2 == floor(floor(x/10000000)/2)) {
cal += x+'<br>'
}
}
}
}
}
}
}
}
}

document.write(cal);