Created
August 16, 2012 12:20
-
-
Save ichirin2501/3369778 to your computer and use it in GitHub Desktop.
Project Euler 25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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