Skip to content

Instantly share code, notes, and snippets.

@kazua
Created October 7, 2013 12:27
Show Gist options
  • Save kazua/6867029 to your computer and use it in GitHub Desktop.
Save kazua/6867029 to your computer and use it in GitHub Desktop.
Project Euler Problem 1
<?php
//write kazua
$result = 0;
$result = array_sum(array_filter(range(1, 999),
function ($value) {
return (($value % 3 == 0) || ($value % 5 == 0));
}));
echo $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment