10 lines
275 B
Python
10 lines
275 B
Python
from tools import number_theory
|
|
|
|
def deno_count(num):
|
|
return len(list(filter(lambda x: 1 == number_theory.gcd(num, x), range(num // 3 + 1, num // 2 + num % 2))))
|
|
|
|
def count(limit):
|
|
return sum(list(map(lambda x: deno_count(x), range(limit + 1))))
|
|
|
|
print(count(12000))
|