Pergunta de entrevista da empresa X

Write code to show all co-prime number smaller than n.

Resposta da entrevista

Sigiloso

24 de mar. de 2016

def common(x,y): if y == 0: return x else: return common(y, x%y) co_prime = [(i,j) for i in range(n) for j in range(i+1,n) if common(i,j) ==1] return co_prime I didn't check but I think it most be true