Buggy python submission (verdict: Time Limit Exceeded):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return max(fct)


for i in range(n):
    a[i]=factorize(a[i])

count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fractions.gcd(count, a[i+1])
ans=0


for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import sys
input = sys.stdin.readline
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fractions.gcd(count, a[i+1])
ans=0


for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):

mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fractions.gcd(count, a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fractions.gcd(count, a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fraction.gcd(count, a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

count=a[0]
for i in range(n-1):
    count=count*a[i+1]//fraction.gcd(x, y)
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=tuple(list(map(int,input().split())))

def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa%=mod
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa%=mod
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    ans%=mod
print(ans)

Fixed submission:
import fractions
mod=10**9+7
n=int(input())
a=list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

count=a[0]
for i in range(n-1):
    count=lcm(count,a[i+1])
ans=0
for i in range(n):
    ansa=count//a[i]
    ans+=ansa
    
print(ans%mod)