From 9d98a914f506b116b7f138af6be4ef1d3eed293a Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Mon, 12 Apr 2010 15:53:13 +0000 Subject: [PATCH] Renamed prime factor function git-svn-id: file:///srv/svn/euler@34 e5f4c3ec-3c0c-11df-b522-21efaa4426b5 --- e003.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e003.py b/e003.py index ee18939..4ef4229 100644 --- a/e003.py +++ b/e003.py @@ -1,12 +1,12 @@ -def factor(n): +def pfactor(n): i = 2 while (n % i != 0 and i < n): i = i + 1 if i == n: return [n] - p = factor(n // i) + p = pfactor(n // i) p.append(i) return sorted(p, reverse=True) print 'Prime factors of 600851475143:' -print factor(600851475143) +print pfactor(600851475143)