summaryrefslogtreecommitdiff
path: root/073.py
blob: 4aeb7ab90f785d2b5f0631e519b0c4b2cc66b7b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

limit = 12000

fractions = set()

for d in xrange(2, limit+1):
	start_n = (d+3)/3
	end_n = d/2

	for n in xrange(start_n, end_n+1):
		fractions.add(float(n)/d)

print len(fractions)