mirror of
https://github.com/correl/euler.git
synced 2024-11-27 11:09:54 +00:00
Problem 005
git-svn-id: file:///srv/svn/euler@23 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
9d96efdaf3
commit
82c0ac0672
1 changed files with 12 additions and 0 deletions
12
005.py
Normal file
12
005.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
print 'Smallest number: ', divisible(20)
|
Loading…
Reference in a new issue