2017-08-16 22:54:45 +08:00

11 lines
183 B
Python

gcd = lambda x, y: y == 0 and x or gcd(y, x % y)
total = 0
for i in xrange(12001):
for j in xrange(i / 3 + 1, i / 2 + i % 2):
if gcd(i, j) == 1:
total += 1
print total