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!