mirror of
https://github.com/correl/euler.git
synced 2024-11-27 19:19:50 +00:00
Correl Roush
715e24dcf3
excecutable code if they are called directly. git-svn-id: file:///srv/svn/euler@29 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
12 lines
278 B
Python
12 lines
278 B
Python
def divisible(n):
|
|
i = 0
|
|
while True:
|
|
i = i + 1
|
|
x = n * i
|
|
for ii in range(n, 0, -1):
|
|
if x % ii != 0:
|
|
break
|
|
if ii == 1:
|
|
return x
|
|
if __name__ == '__main__':
|
|
print 'Smallest number: ', divisible(20)
|