Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Puzzle: What is the largest integer whose digits are all different (and do not include 0) that is divisible by each of its individual digits?

by fizbin (Chaplain)
on Oct 27, 2005 at 14:02 UTC ( [id://503339]=note: print w/replies, xml ) Need Help??


in reply to Re: Puzzle: What is the largest integer whose digits are all different (and do not include 0) that is divisible by each of its individual digits?
in thread Puzzle: What is the largest integer whose digits are all different (and do not include 0) that is divisible by each of its individual digits?

No it's not. Try my program. (which spits out all the answers in under 1.5 seconds)

As proof that yours isn't the largest, consider 9231768 (also not the largest):

$ bc -l bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 9231768 / 8 1153971.00000000000000000000 9231768 / 9 1025752.00000000000000000000 9231768 / 7 1318824.00000000000000000000

(The other digits follow as a consequence, or you can check them yourself)

--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
  • Comment on Re^2: Puzzle: What is the largest integer whose digits are all different (and do not include 0) that is divisible by each of its individual digits?
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Puzzle: What is the largest integer whose digits are all different (and do not include 0) that is divisible by each of its individual digits?
by gri6507 (Deacon) on Oct 27, 2005 at 15:16 UTC
    Clever simplification. If the number is divisible by 9,8,7, and 5, then it must also be divisible by 4,3,2, and 1. At first I thought you forgot about the divide by 5 test, but the I saw that your number doesn't contain 5. Clever!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://503339]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found