Created
October 14, 2013 13:19
-
-
Save kazua/6975473 to your computer and use it in GitHub Desktop.
Project Euler Problem 6(PHP)
This file contains hidden or 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
| <?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