• + 0 comments
    1. def gcd(a,b):

      if b==0 :

      return a
      
      • return gcd(b,a%b)![https://)

    def ppcm(a,b): return a*b//gcd(a,b)

    def solve(a): # Write your code here L=[a[0]] for i in range(len(a)-1): L.append(ppcm(a[i],a[i+1])) L.append(a[-1]) return L