problem1
Sum all multiples of 3 or 5 up to given limit
Verifies whether or not the parameter given is compliant
Do the calculations
problem1(limit)
limit | A positive integer. |
---|
The total of the sum.
This function has the following complexity O(n)
https://projecteuler.net/problem=1 for more info about it.
problem1(10)#> [1] 23problem1(100)#> [1] 2318problem1(1000)#> [1] 233168