You are viewing a single comment's thread. Return to all comments →
def gcd(a,b): if(b==0):return a else:return gcd(b,a%b)
def solve(a): # Write your code here p=reduce(gcd,a) if(p==1):return "YES" else:return "NO"
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and GCD
You are viewing a single comment's thread. Return to all comments →
def gcd(a,b): if(b==0):return a else:return gcd(b,a%b)
def solve(a): # Write your code here p=reduce(gcd,a) if(p==1):return "YES" else:return "NO"