Created
September 17, 2012 22:25
-
-
Save adamancini/3740163 to your computer and use it in GitHub Desktop.
euler5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## euler5 | |
def euler5(upperBound): | |
smallest = 20 | |
done = False | |
while not done: | |
for x in range(2,upperBound+1): | |
if smallest % x != 0: | |
smallest += upperBound | |
break | |
else: | |
done = True | |
return smallest | |
def main(): | |
print 'hello world' | |
print euler5(10) | |
print euler5(20) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment