Created
May 18, 2012 17:18
-
-
Save mrklein/2726518 to your computer and use it in GitHub Desktop.
Project Euler #73
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
#!/usr/bin/env python | |
from fractions import gcd | |
s = 4 | |
e = 12001 | |
nf = 0 | |
for d in xrange(s, e): | |
for n in xrange(d/3 - 1, d/2 + 1): | |
if d < 3*n and 2*n < d: | |
if gcd(n, d) == 1: | |
nf += 1 | |
print(nf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment