summaryrefslogtreecommitdiff
path: root/Problem5.py
blob: 81b063c4f36831358e00f6c470739999399cf54e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def isdivisible(n):
    divisors = [19,18,17,16,15,14,13,11]
    for x in range(0,8): #Checks if value is divisible by numbers 2-20 (1 is not necessary to check)
        if n % divisors[x] != 0:
            return False              
    return True
valuefound = False
counter = 20
while valuefound == False:
    if isdivisible(counter) == True:
        valuefound == True
        print("**Result**:",counter)
        break
    else:
        print(counter)
        counter+=20 #increment by the largest required multiple