Skip to content

Instantly share code, notes, and snippets.

@kazua
Created October 14, 2013 13:19
Show Gist options
  • Save kazua/6975473 to your computer and use it in GitHub Desktop.
Save kazua/6975473 to your computer and use it in GitHub Desktop.
Project Euler Problem 6(PHP)
<?php
//write kazua
for ($i = 1; $i <= 100; $i++) {
$a1 += pow($i, 2);
$a2 += $i;
}
$result = pow($a2, 2) - $a1;
echo $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment