Posted By

cmm7825 on 06/21/10


Tagged


Versions (?)

Problem 29


 / Published in: Perl
 

  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use Math::BigInt;
  6.  
  7. my %values;
  8. for my $a (2..100){
  9. for my $b (2..100){
  10. my $x = Math::BigInt->new($a);
  11. my $y = Math::BigInt->new($b);
  12. my $z = $x->bpow($y);
  13. $values{$z} = 1;
  14. }
  15. }
  16.  
  17. my $unique = keys %values;
  18. print "$unique\n";

Report this snippet  

You need to login to post a comment.