Skip to content

Instantly share code, notes, and snippets.

@ichirin2501
Created August 16, 2012 12:20
Show Gist options
  • Save ichirin2501/3369778 to your computer and use it in GitHub Desktop.
Save ichirin2501/3369778 to your computer and use it in GitHub Desktop.
Project Euler 25
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use bigint;
my ($a, $b, $idx) = (1, 1, 1);
while(1){
if( length($a) >= 1000 ){
print $idx,"\n";
last;
}
$b += $a;
$a = $b - $a;
$idx++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment