Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66910 胡海峰老师 最简真分数 Python3 Runtime Error 4000 MS 3780 KB 477 2024-03-11 15:32:57

Tests(2/10):


Code:

def max_common_divisor(x,y): if x<y: x,y = y,x t = y while t!=1: if x%t==0 and y%t==0: break t -=1 return t n = int(input()) a = list(map(int,input().split())) a.sort() cnt =0 for i in range(n-1): for j in range(i+1,n): ai = a[i] aj = a[j] if aj%ai!=0: if max_common_divisor(ai,aj)==1: #print( f"{ai}/{aj}") cnt +=1 print(cnt)


Run Info:

Runtime Error:[ERROR] A not allowed system call.
Call ID:511