mirror of
https://github.com/correl/euler.git
synced 2024-11-23 19:19:53 +00:00
Wrap executable code so it can be used a library
git-svn-id: file:///srv/svn/euler@35 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
9d98a914f5
commit
f151766af6
1 changed files with 3 additions and 2 deletions
5
e003.py
5
e003.py
|
@ -8,5 +8,6 @@ def pfactor(n):
|
||||||
p.append(i)
|
p.append(i)
|
||||||
return sorted(p, reverse=True)
|
return sorted(p, reverse=True)
|
||||||
|
|
||||||
print 'Prime factors of 600851475143:'
|
if __name__ == '__main__':
|
||||||
print pfactor(600851475143)
|
print 'Prime factors of 600851475143:'
|
||||||
|
print pfactor(600851475143)
|
||||||
|
|
Loading…
Reference in a new issue