Help for this page

Select Code to Download


  1. or download this
    =begin output
    
  2. or download this
    50 = 28 + 1 + 21
    51 = 0 + 15 + 36
    52 = 21 + 3 + 28
    53 = 10 + 28 + 15
    54 = 6 + 3 + 45
    
  3. or download this
    
    =cut 
    ...
    use warnings; use 5.010; use strict;
    use POSIX qw"floor";
    
  4. or download this
    sub triang_decompose_1 {
        my($goal, $found, $n0, $n1, $n2);
    ...
        }
    }
    
  5. or download this
    sub triang_decompose_2 {
        my($goal, $found, $n0, $n1, $n2);
    ...
        }
    }
    
  6. or download this
    sub triang_decompose_3 {
        my($goal, $found, $n0, $n1, $n2, $rem2, $rem1);
    ...
            }
        }
    }
    
  7. or download this
    
    say "Solution 1:";
    ...
    triang_decompose_3();
    
    __END__