Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. // Project Euler problem 73
  2. from fractions import gcd
  3.  
  4. limit = 12000
  5. print len([n/d for n in xrange(1, limit + 1) for d in xrange(1, limit + 1)
  6.          if gcd(n,d) == 1 and 1.0 / 2 > 1.0 * n / d > 1.0 / 3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement