If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Finish the solution so that it returns the sum of all the multiples of 3 or 5 **below** the number passed in. 

> Note: If the number is a multiple of **both** 3 and 5, only count it *once*.
> Also, if a number is negative, return 0(for languages that do have them)
  
###### *Courtesy of projecteuler.net*

Difficulty: EASY
Starter code: def solution(number):
	

Solutions:
def solution(number):
	return sum((x for x in range(number) if x % 3 == 0 or x % 5 == 0))


from math import floor

def sum_to_n(n):
	return n * (n + 1) / 2

def sum_of_multiples(k, n):
	return k * sum_to_n(floor(n / k))

def solution(number):
	number = number - 1
	return sum_of_multiples(3, number) + sum_of_multiples(5, number) - sum_of_multiples(3 * 5, number)


def solution(number):
	import itertools
	return sum(set(itertools.chain(range(0, number, 3), range(0, number, 5))))


class Multiples:

	def __init__(self, maximum):
		self.maximum = maximum

	def sum(self, base):
		count = self.maximum // base + 1
		last = base * (count - 1)
		return count * last // 2

def solution(number):
	multiples = Multiples(number - 1)
	return multiples.sum(3) + multiples.sum(5) - multiples.sum(15)


def solution(number):
	multiples = []
	sum = 0
	for i in range(number):
		if i % 3 == 0 or i % 5 == 0:
			multiples.append(i)
	for x in multiples:
		sum += x
	return sum


def solution(number):
	x = number - 1
	f = lambda n: n * (n + 1) // 2
	return 3 * f(x // 3) + 5 * f(x // 5) - 15 * f(x // 15)


def solution(number):

	def s(m):
		n = (number - 1) // m
		return n * m * (n + 1) // 2
	return s(3) + s(5) - s(15)


def solution(number):
	return sum(set(range(0, number, 3)) | set(range(0, number, 5)))


solution = lambda n: sum((i for i in range(n) if i % 3 == 0 or i % 5 == 0))


def solution(number):
	return sum(range(0, number, 3)) + sum(range(0, number, 5)) - sum(range(0, number, 15))


def solution(number):
	return sum((num if num % 3 == 0 or num % 5 == 0 else 0 for num in range(number)))