10 lines
258 B
PHP
10 lines
258 B
PHP
<?php
|
|
//Write a program or solve manually to find the smallest positive number that is evenly divisible by all of the numbers from 1 to 20.
|
|
$m3 = range(3, 1000, 3);
|
|
$m5 = range(5, 1000, 5);
|
|
|
|
$all = array_unique(array_merge($m3,$m5));
|
|
|
|
echo array_sum($all);
|
|
|