Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce 
def lcm_base(x, y):
  return(x * y) // gcd(x, y)
def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int, input().split()))

mod = 10**9 + 7
min = lcm_list(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i])%mod 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Runtime Error):
    from fractions import gcd
    from functools import reduce
     
    mod = 10 ** 9 + 7
     
    def lcm_base(x, y):
        return (x * y) // gcd(x, y)
     
    def lcm(numbers):
        return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
    N = int(input())
    A = list(map(int,(input().split())))
     
    lcmn = lcm(A)
     
    ans = 0
    for i in range(len(A)):
        ans += lcmn // A[i]
     
    # print('-----output-----')
    print(int(ans%mod))

Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce 
def lcm_base(x, y):
  return(x * y) // gcd(x, y)
def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int, input().split()))

mod = 1000000000 + 7
min = lcm_list(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i])%mod 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce 
def lcm_base(x, y):
  return(x * y) // gcd(x, y)
def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int, input().split()))

mod = 1000000000 + 7
min = lcm_list(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i])%mod 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
from functools import reduce 
def gcd(*numbers):
  return reduce(fractions.gcd, numbers)
def lcm_base(x, y):
  return(x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int, input().split()))

mod = 1000000000 + 7
min = lcm_list(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i])%mod 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
def lcm(a):
  from fractions import gcd
  x = a[0]
  for i in range(1, len(a)):
    x = (x * a[i] // gcd(x, a[i]))
  return x

n = int(input())
a = list(map(int, input().split()))

mod = 1000000000 + 7
min = lcm(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i])%mod 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
def lcm(a):
  from fractions import gcd
  x = a[0]
  for i in range(1, len(a)):
    x = (x * a[i] // gcd(x, a[i]))
  return x

n = int(input())
a = list(map(int, input().split()))

mod = 1000000000 + 7
min = lcm(a)
sum = 0
for i in range(n):
  sum = sum + (min//a[i]) 
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))

Buggy python submission (verdict: Time Limit Exceeded):
def lcm(a):
  from fractions import gcd
  x = a[0]
  for i in range(1, len(a)):
    x = (x * a[i] // gcd(x, a[i]))
  return x

n = int(input())
a = list(map(int, input().split()))
i = 0
mod = 1000000000 + 7
min = lcm(a)
sum = 0
while i < n:
  sum = sum + (min//a[i]) 
  i = i + 1
  
print(sum%mod)



Fixed submission:
from fractions import gcd
from functools import reduce
     
mod = 10 ** 9 + 7
     
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
     
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)
     
    # print('input >>')
N = int(input())
A = list(map(int,(input().split())))
     
lcmn = lcm(A)
    
ans = 0
for i in range(len(A)):
    ans += lcmn // A[i]
     
    # print('-----output-----')
print(int(ans%mod))