Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87160 丁俊杰 最简真分数 Python3 Wrong Answer 31 MS 3756 KB 353 2024-08-04 14:20:29

Tests(0/10):


Code:

from math import gcd def jisuan_zuijian_zhenfenshu(n): a=list(map(int,input().split())) a=sorted(set(a)) #去重并排序 count=0 for i in range(len(a)-1): for j in range(i+1,len(a)): if gcd(a[i],a[j])==1: count+=1 return count n=int(input()) print(jisuan_zuijian_zhenfenshu(n))


Run Info:

------Input------
5 2 2 12 4 7
------Answer-----
4
------Your output-----
3