Your task is to write function ```findSum```.

Upto and including ```n```, this function will return the sum of all multiples of 3 and 5.

For example:

```findSum(5)``` should return 8 (3 + 5)

```findSum(10)``` should return 33 (3 + 5 + 6 + 9 + 10)

Difficulty: introductory

Starter code:

def find(n):
	

Solutions:
def find(n):
    return sum(e for e in range(1, n+1) if e % 3 == 0 or e % 5 == 0)

def find(n):
    sum = 0
    for i in range(1,n+1):
        if i % 3 == 0 or i % 5 == 0:
            sum += i
    return sum

def find(n):
    return sum(range(0, n+1, 3)) + sum(range(0, n+1, 5)) - sum(range(0, n+1, 15))

def find(n):
    return sum([x for x in range(1,n+1) if not x%3 or not x%5])

def find(n):
    return sum( set(range(0, n+1, 3)) | set(range(0, n+1, 5)) )

def find(n):
    return sum(i for  i in range(n+1) if i % 3 == 0 or i % 5 == 0)

def find(n):
    c_3 = n // 0x3
    c_5 = n // 0x5
    c_f = n // 0xf
    
    s_3 = c_3 * (0x3 + c_3 * 0x3) // 2
    s_5 = c_5 * (0x5 + c_5 * 0x5) // 2
    s_f = c_f * (0xf + c_f * 0xf) // 2
    
    return s_3 + s_5 - s_f


def find(n):
    return sum(set([x for x in range(0, n+1, 3)] + [x for x in range(0, n+1, 5)]))

def find(n):
    return sum([i for i in range(0,n+1) if i%3==0 or i%5==0])


def find(n):
    return sum([i for i in range(n+1) if (i%3==0 or i%5==0)])

def find(n):
    return sum([ele for ele in range(3,n+1,3) if ele%5!=0])+sum(range(5,n+1,5))

def find(n):
    # Code here
    L = []
    for i in range(n+1):
        if i % 3 == 0 or i % 5 == 0:
            L.append(i)
    return sum(L)

def find(n):
    n = n + 1
    sum = 0
    for x in range(n):
        if x % 3 == 0 or x % 5 == 0:
            sum += x
    return sum

find = lambda n: sum(e for e in range(n+1) if not e%3 or not e%5)

def find(n):
    return sum(x for x in range(n + 1) if not (x % 3 and x % 5))

def find(n):
    total = 0
    for i in range(n + 1):
        if (i % 3 == 0) or (i % 5 == 0):
          total += i
    return total      
    # Code here


from operator import mul
from functools import reduce, partial
from itertools import combinations

def prod(numbers):
    return reduce(mul, numbers)

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

def multipes_sum(divisor, n):
    return range_sum(n//divisor) * divisor

def something(limit, divisors, size):
    """How should I name this?"""
    return sum(multipes_sum(prod(numbers), limit)
               for numbers in combinations(divisors, size))

def divisors_multiples_sum(n, divisors=()):
    result = 0
    for i in range(len(divisors)):
        result += (-1)**i * something(n, divisors, i+1)
    return int(result)

find = partial(divisors_multiples_sum, divisors=(3,5))


find = lambda n:n//3*(n//3+1)/2*3 + n//5*(n//5+1)/2*5 - n//15*(n//15+1)/2*15

def find(n):
    sum3 = sum([3*i for i in range(1,n//3+1)])
    sum5 = sum([5*j for j in range(1,n//5 +1) if j%3 != 0])
    return sum3+sum5
    


def find(n):
    k1, k2, k3 = n // 3, n // 5, n // 15
    return (3 * k1 * (k1 + 1) >> 1) + (5 * k2 * (k2 + 1) >> 1) - (15 * k3 * (k3 + 1) >> 1)

def find(n):
    x = sum(i for i in range(n+1) if i % 3 == 0 or i % 5 == 0)
    return x

def find(n):
  return sum([x for x in range(n+1) if x%3 == 0 or x%5 == 0])
    # Code here


def find(n: int) -> int:
    """ Get the sum of all multiples of 3 and 5 limited to `n`. """
    return sum(filter(lambda num: any([not num % 3, not num % 5]), range(n + 1)))

def find(n):
    return sum(range(3,n+1,3)) + sum(x for x in range(5,n+1,5) if x % 3 != 0)

def find(n):
    def F(k):
        m = n // k
        return m * (m + 1) * k // 2
        
    return F(3) + F(5) - F(15)

def find(num):
    result = []
    num = list(range(1,num+1))
    for zahl in num:
        if (zahl%3 == 0) or (zahl%5 == 0):
            result.append(zahl) 
    return sum(result)

def find(n):
    if n>30:
        full = n//30
        half = n%30
        sum = full*(full-1)*210
        for i in range(3, half+1):
            if i%3==0 or i%5==0:
                sum += i+(full*30)
        sum += (225*full)
        return sum
    else:
        sum = 0
        for i in range(3,n+1):
            if i%3==0 or i%5==0:
                sum += i
        return sum

def find(n):
    divideBy5 = n // 5
    divideBy3 = n // 3
    divideBy15 = n // 15
    sum = (5 * divideBy5 + 5) * divideBy5 //2  + (3 * divideBy3 + 3) * divideBy3 //2 -(15 * divideBy15 + 15) * divideBy15 //2 
    return sum

def find(n):
    sum =0
    for i in range(0,n+1,3):
        sum = sum + i
    for i in range(0,n+1,5):
        if i%3!=0:
            sum = sum + i
    return sum

sum_naturals = lambda n: n * (n + 1) // 2
sum_multiples = lambda n, m: m * sum_naturals(n // m)

def find(n):
    return sum_multiples(n, 3) + sum_multiples(n, 5) - sum_multiples(n, 15)

def find(n):
    return sum([x for x in range(3, n + 1) if not x % 3 or not x % 5])


from math import floor
def find(n):
    return sum(3 * i for i in range(1, floor(n / 3) + 1)) + sum(5 * i for i in range(1, floor(n / 5) + 1) if (5 * i) % 3 != 0)
    


def find(n):
    # up to, including n
    # range(n +1)
    # iterate over number
    # if divisible by 3 or 5
    # add to total
    total = 0
    for num in range(n+1):
        if num % 3 == 0 or num % 5 == 0:
            total += num
    return total

def find(n):
    x = 0
    for i in range(n):
        z = i + 1
        if (z % 3 == 0) or (z % 5 == 0):
            x += z

    return x


def find(n):
    ans = 0
    for i in range(0,n+1):
        if i % 3 == 0:
            ans = ans + i
        elif i % 5== 0:
            ans = ans + i
    return ans        

def find(n):
    sum = 0
    for a in range (1, n+1):
        if a%3 == 0 or a%5 == 0:
            sum = sum + a
    return sum

def find(n):
    list_1 = []
    for x in range(1,n+1):
        if x%3 == 0 or x%5 == 0:
            list_1.append(x)
    i = 0
    for y in list_1:
        i = i+y
    return i

def find(n):
    i=3
    b=5
    c=0
    while i <= n:
        c=c+i
        
        i+=3

    while b<=n:
        if b % 3 != 0:
            c=c+b
            
            b+=5
        else:
            b+=5
    
    return c

def find(n):
    return n//5*5/2*(n//5+1) + n//3*3/2*(n//3+1) - n//15*15/2*(n//15+1) 

def find(n):
    summe = []
    for x in range(n+1):
        if x%3 == 0 or x%5 == 0:
            summe.append(x)
    return sum(summe)

def find(n):
    sum=0
    for i in range (1,n+1) :
        if i %3==0 or i%5==0:
            sum+=i
        
    return(sum)
    
print(find(5))

def find(n):
    sum = 0
    for i in range(1,n+1):
        if i % 3 == 0 or i % 5 == 0:
            sum += i
    return sum
print(find(9))

def find(n):
    sum2 = 0
    for i in range(n+1):
        if i%5 ==0 or i%3 == 0:
            sum2 += i
    return sum2

def find(number):
    result = []
    for i in range(1, number+1):
        if i % 3 == 0 or i % 5 == 0:
            result.append(i)

    return sum(result)

def find(n):
    count1 = 0
    count2 = 0
    for i in range(5,n+1,5):
        count2+=1
        if count2 ==3:
            count2 =0
            continue
        count1+=i
    for i in range(3,n+1,3):
        count1+=i
    return count1

def find(n):
    #Create a list's containing my multiples of 5 and 3
    a = list(range(5, (n)+1, 5))
    b = list(range(3, (n)+1, 3))
    
    # create sets of my list
    c = set(a)
    d = set(b)
    
    #remove the duplicates and create a list of removed duplicates
    e = list(d - c)
    
    #Sum list together
    return sum(a + e)

def find(n):
    total = 0
    testCase = 1
    
    while testCase <= n:
        if testCase % 3 == 0 or testCase % 5 == 0:
            total += testCase
        
        testCase += 1
    
    return total

def find(n):
    i = 1
    ans = []
    while i <= n:
        if i % 3 == 0:
            ans.append(i)
        elif i % 5 == 0:
            ans.append(i)
        i += 1
    return sum(ans)


from functools import reduce
def find(n):
    return reduce(
        lambda x, y: x + y if y % 3 == 0 or y % 5 == 0 else x, 
        list(range(n+1)), 
        0
    )


def find(n):
    resultat = sum([i for i in range(n+1) if i%3==0 or i%5==0])
    return resultat



def find(n):
    # Code here
    a = 0
    for i in range(3, n+1):
        if i % 3 == 0:
            a += i
        elif i % 5 == 0:
            a += i
    return a

def find(n):
    multsf = [5*i for i in range(1,n+1) if 5*i<=n] 
    multst = [3*i for i in range(1,n+1) if 3*i<=n]
 
      
  

    return sum(multst) + sum(list(set(multsf)-set(multst)))
    
    
    
    


def find(n):
    sum=0
    for i in range(1,n+1):
        if (i % 3 == 0) | (i % 5 == 0):
            sum+=i
    return sum

def find(n):
    result = 0
    while n > 0:
        if n == 0:
            break
        elif n%3 == 0 or n%5 == 0: 
            result += n
        n-=1
    return result

def find(n):
    return sum(x for x in range(3, n+1) if not x%3 or not x%5)

def relevant():
    i = 3
    while True:
        if i%3 == 0 or i%5 == 0:
            yield i
        i+=1

def find(n):
    from itertools import takewhile
    return sum(takewhile(lambda x : x<= n , relevant()))

def find(n):
    return sum(list(filter(lambda x: x % 3 == 0 or x % 5 == 0, list(range(1, n + 1)))))

def find(n):
    st = 0
    for i in range(n + 1):
        if i % 3 == 0 or i % 5 == 0:
            st += i
    return st

def find(n):
    #return sum(n for n in range(n+1) if n%3==0 or n%5==0)

    a3 = n // 3
    a5 = n // 5
    a15 = n // 15
    sum3 = 3 * a3 * (a3 + 1) // 2
    sum5 = 5 * a5 * (a5 + 1) // 2
    sum15 = 15 * a15 * (a15 + 1) // 2
    
    return sum3 + sum5 - sum15

def find(n):
    tot = 0
    
    for i in range(3,n+1,3):
        tot += i
    
    for j in range(5,n+1,5):
        tot += j
    
    if n > 14:
        for j in range(15,n+1,15):
            tot -= j
    
    return tot

def find(n):   
    sumOfNumbers = 0
    number=1
    while(number<=n):
        if (number%3==0 or number%5==0):
            sumOfNumbers=sumOfNumbers + number
        number+=1
    return sumOfNumbers


def find(n):
    # Code here
    holder = 0
    for i in range(n + 1):
        if i % 3 == 0 or i % 5 == 0:
            holder =  holder + i
    return holder
        
        
        


def find(n):
    m=[]
    i=1
    while i<=n:
        if i%3==0 or i%5==0:
            m.append(i)
        i+=1
    x=sum(m)
    return x
    # Code here


def find(n):
    return sum([j for j in range(n+1) if j % 3 == 0 or j % 5 == 0])
    


def find(n):
    x=0
    sum=0
    while (x<=n):
        if(x%3==0 or x%5==0):
            sum = sum+x
        x=x+1
    return sum

def find(n):
    # Code here
    multiplesList = 0
    for i in range(n+1):
        if i%3 == 0 or i%5 == 0:
            multiplesList+=i
    
    return multiplesList



def find(n):
    # Code here
    ans=0.0
    for i in range(n+1):
        if i%3 ==0 or i%5==0:
            ans+=i
    return ans  
find(10)

def find(n):
    return sum(filter(IsMultiple, range(n+1)))

def IsMultiple(n):
    return n%3==0 or n%5==0

def find(n):
    em = []
    for i in range(n+1):
        if i % 3 == 0:
            em.append(i)
        elif i % 5 == 0:
            em.append(i)
    return sum(em)

def find(n):
    
    arr = []
    total = 0
    for i in range(n + 1):
        if i % 3 == 0:
            arr.append(i)
        elif i % 5 == 0:
            arr.append(i)
    
    for num in arr:
        total = total + num
    
    return total

def find(n):
    if n < 3: return 0
    sum = 0
    for i in range (3, n+1):
        if (i % 3 == 0) | (i % 5 == 0): sum += i
    return sum
    # Code here


def find(n):
    l = []
    calc = 0
    for x in range(n + 1):
        if x % 3 == 0:
            l.append(x)
            
        if x % 5 == 0:
            l.append(x)
    l = list(set(l))
    for y in range(len(l)):
        calc = calc + l[y]
    return calc

def find(n):
    return sum([multiple for multiple in range(1,n+1) if multiple % 3 == 0 or multiple % 5 == 0])

def find(n):
    return sum([x for x in range(1,n+1, 1) if (x/3).is_integer() or (x/5).is_integer()])

def find(n):
    # Code here
    sum=0
    for i in range(n+1):
        if i % 5 == 0:
            sum = sum + i
        elif i % 3 == 0:
            sum = sum + i
            
    return sum

def find(n):
    x = lambda b: range(0, n + 1, b)
    return sum(set((*x(3), *x(5))))

def find(n):
    i=1
    count=0
    while i <=n:
        
        #print(i)
        if (i%3)==0 or (i%5)==0:
            count=count+i
        #    print (count)
        i=i+1
    return (count)

def find(n):
    summ = [i for i in range(n+1) if i % 3 == 0 or i % 5 == 0]
    return sum(summ)

def find(n):
    char=n+1
    mystr=0
    while char>=4:
        char-=1
        if(char%3)==0:
            mystr+=(char)
    
        else:
            if(char)%5==0:
                    mystr+=(char)
        if char==3:    
            return(int(mystr)) 
    # Code here


def find(n):
    m = 0
    for i in range(1,n+1): 
        if i % 3 is 0 or i % 5 is 0 : m = m + i
    return m

def find(n):
    return sum(filter(lambda i: (i % 5==0) or (i % 3==0), range(n+1)))

def find(n):
    finalSum = 0
    for i in range(n+1):
        if i % 3 == 0:
            finalSum += i
        elif i % 5 == 0:
            finalSum += i
    return finalSum

def find(n):
    mof3 = [i for i in range(3,n+1,3)]
    mof5 = [i for i in range(5,n+1,5)]
    mof3.extend(mof5)
    all_num_to_n = set(sorted(mof3))
    return sum(all_num_to_n)

def find(n):
    l = range(3, n + 1)
    ans = 0
    for i in l:
        if i % 3 == 0 or i % 5 == 0:
            ans += i
    return ans

def find(n):
    g = [i for i in range (0, n+1) if i %3 ==0 or i%5 == 0]
    return sum(g)

def find(n):
    # Code here
    total = 0
    i = 0
    while i < n:
        i+=1
        if i%3 == 0 or i%5 == 0:
            total = total + i
    return total
    
     
    


def find(n):
    # Code here    
    return sum(filter(is_multiple_of_3_or_5, range(n+1)))

def is_multiple_of_3_or_5(n):
    return n%3==0 or n%5==0

def find(n):
    a = (n // 3) * (n // 3 + 1) // 2 * 3
    b = (n // 5) * (n // 5 + 1) // 2 * 5
    c = (n // 15) * (n // 15 + 1) // 2 * 15
    
    return a + b - c

def find(n):
    sum=0
    for x in range(n):
        if (x%3 == 0 or x%5 == 0):
            sum += x
    if(n%3 == 0 or n%5==0):
        return sum + n
    else:        
        return sum

print(find(5))

def find(n):
    nums = [i for i in range(1, n+1) if i % 3 == 0 or i % 5 == 0]
    return sum(nums)

def find(n):
    x = [number for number in range(n+1) if number%3==0 or number%5==0]
    return sum(x)


def find(n):
    sum = int()
    for i in range(1, n + 1):
        if i % 3 == 0 or i % 5 == 0:
            sum += i
    return sum



def find(n):
    numbers = [number for number in range(1, n+1) if number%3==0 or number%5==0]
    return sum(numbers)

def find(n):
    x = list(range(n+1))
    y = []
    for i in x:
        if i%3 == 0 or i%5 == 0:
            y.append(i)
    return sum(y)


from functools import reduce

def find(n):
    zoo = [i for i in range(0, n+1) if i % 3 == 0 or i % 5 == 0]
    return reduce(lambda x,y: x+y, zoo)

def find(n):
    multiples = []
    for i in range(1, n+1):
        if i % 5 == 0 or i % 3 == 0:
            multiples.append(i)
    return sum(multiples)


def find(n):
    x = 0
    multiples = []
    while x <= n:
        if x % 3 == 0 or x % 5 == 0:
            multiples.append(x)
        x += 1
    return sum(multiples)

def find(n):
    num = 0
    if(n % 5 == 0 or n % 3 == 0): num += n
    for i in range(3,n):
        if not i % 5 or not i % 3:
            num = num + i
    return num

def find(n):
    s = 0
    
    for x in range(0,n+1):
        if x % 3 == 0 or x % 5 ==0:
            s += x
    return(s)
            
    
    
    # Code here


def find(n):
    return sum(loop for loop in range(1, n + 1) if not loop % 3 or not loop % 5)