Posted By

cmm7825 on 05/20/10


Tagged


Versions (?)

Problem 25


 / Published in: Perl
 

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use bignum;
  5.  
  6. my $count = 2;
  7. my @vals = (0,1);
  8.  
  9. while(1){
  10. push @vals, ($vals[-1] + $vals[-2]);
  11. die $count if $vals[-1] =~ m/\d{1000}/;
  12. $count++;
  13. }

Report this snippet  

You need to login to post a comment.