Quick actions

cmd+k|ctrl+k

Navigation

Languages

Euler #5

Snippet info

Language

Python

Visibility

public

Author

apizzimenti

Created

2016-03-15T18:29:48Z

Updated

2016-03-15T18:29:48Z

def get_sol(top):
    flag = True
    a = 2520
    count = 0
    
    while flag:
        for i in range(11, top + 1):
            if count == top:
                print(a)
                flag = False
            if a % i == 0:
                count += 1
            elif a % i != 0:
                count = 0
                a += 2520
                break
            
get_sol(20)
INFO