Skip to content

Instantly share code, notes, and snippets.

@kazua
Created November 10, 2013 05:04
Show Gist options
  • Save kazua/7394059 to your computer and use it in GitHub Desktop.
Save kazua/7394059 to your computer and use it in GitHub Desktop.
Project Euler Problem 25(PHP)
<?php
//http://odz.sakura.ne.jp/projecteuler/index.php?cmd=read&page=Problem%2025
//write kazua
for ($a = array(1 => "1", "1"), $i = 3; strlen($a[$i - 1]) < 1000; $i++)
$a[$i] = bcadd($a[$i - 2], $a[$i - 1]);
echo ($i - 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment