Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Weird number generator

by jimt (Chaplain)
on Oct 23, 2006 at 15:53 UTC ( [id://580083]=obfuscated: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    {$s=eval join'+',@d=grep!($n%$_),1..
    ...
    die;my$t=pop||die'!';eval{w(@_,$s-$t
    )},$@=~/!/||die if$t<=$s;w(@_,$s)}
    
  2. or download this
    
    {
    ...
      w( @_, $s)
    }
    
  3. or download this
    
    {
    ...
      redo
    }
    
  4. or download this
    
    sub w{
    ...
      w( @_, $s)
    }
    
  5. or download this
    
    w(1,2,3,4,6, 12);
    ...
                w(1,2, 2);
                    die (2 == 2), therefore 12 is semiperfect
    
  6. or download this
    
    w(1,7,11,14,18, 21)
    ...
        # 7 <= 7, subtract it from 7, continue
            w(1, 0) #pops off the sum, which is 0 in this case, so we've s
    +ucceeded. "die" with no bang -> success!
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found