output_description: Print the minimum possible value of B_1 + ... + B_N for B_1,...,B_N that
  satisfy the condition, modulo (10^9 +7).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 ... A_N
attempt: def findDivisor(num):
      # 2,3 are the most common divisor for many numbers hence I go by divisor of 2,3
      # if not then by the same number as divisor
      if num % 2 == 0:
          return 2
      elif num % 3 == 0:
          return 3
      return num
  
  
  def findLCM(lcmArray):
      lcm = 1
      while len(lcmArray) > 0:
          minOfLCMArray = min(lcmArray)
          divisor = findDivisor(minOfLCMArray)
  
          for x in range(0, len(lcmArray)):
              Quotient = lcmArray[x] // divisor
              Reminder = lcmArray[x] % divisor
              if Reminder == 0:
                  lcmArray[x] = Quotient
  
          lcm *= divisor
          minOfLCMArray = min(lcmArray)
          if minOfLCMArray == 1:
              lcmArray.remove(minOfLCMArray)
      return lcm
  
  
  n = input()
  a = input().split()
  a = [int(i) for i in a]
  b = a[:]
  
  lcm = findLCM(a)
  
  count = 0
  for i in b:
      count += lcm // i
      count %= 1000000007
  
  print(count)
  
problem_description: Statement
  
  Given are N positive integers A_1,...,A_N.
  
  Consider positive integers B_1, ..., B_N that satisfy the following condition.
  
  Condition: For any i, j such that 1 \leq i < j \leq N, A_i B_i = A_j B_j
  holds.
  
  Find the minimum possible value of B_1 + ... + B_N for such B_1,...,B_N.
  
  Since the answer can be enormous, print the sum modulo (10^9 +7).
samples: [{"input": "3\n    2 3 4", "output": "13\n    \n\nLet B_1=6, B_2=4, and B_3=3, and the condition will be satisfied.\n\n* * *"}, {"input": "5\n    12 12 12 12 12", "output": "5\n    \n\nWe can let all B_i be 1.\n\n* * *"}, {"input": "3\n    1000000 999999 999998", "output": "996989508\n    \n\nPrint the sum modulo (10^9+7)."}]