Blue Bridge Cup python group - both approximate fractions
import os
import sys
import math #math.gcd()方法 它接受两个整数并返回其最大公约数
count = 0
for i in range(1,2021):
for j in range(1,2021):
if math.gcd(i,j) == 1:
#print("{}/{}".format(i,j))
count += 1
print(count)
The answer is 2481215
Thank you for your support. Your one-click three-connection is the biggest driving force for Ganggang students!