From 82c0ac06721de37f780a5edb12c36d8f408569eb Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 12 Apr 2010 15:53:03 +0000 Subject: [PATCH] Problem 005 git-svn-id: file:///srv/svn/euler@23 e5f4c3ec-3c0c-11df-b522-21efaa4426b5 --- 005.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 005.py diff --git a/005.py b/005.py new file mode 100644 index 0000000..f4674a4 --- /dev/null +++ b/005.py @@ -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)