Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    if(b == 0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b):
    return (a*b)//gcd(a,b)
n = int(input())
mod = 1e9 + 7
a = [int(i) for i in input().split()]
ans = 1    
for i in a:
    ans = lcm(ans,i)

print(sum(ans//i for i in a)%mod)


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    if(b == 0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b):
    return (a*b)//gcd(a,b)
n = int(input())
mod = 1e9 + 7
a = [int(i) for i in input().split()]
ans = 1    
for i in a:
    ans = lcm(ans,i)

print("%d" %(sum(ans//i for i in a)%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    if(b == 0):
        return a
    else:
        return gcd(b,a%b)

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

n = int(input())
b = [1]*(n+5)
mod = 1e9 + 7
a = [int(i) for i in input().split()]
    
for i in range(n):
    for j in range(i+1,n):
        x = a[i]
        y = a[j]
        m = gcd(x,y)
        x //= m
        y //= m
        b[i] = lcm(b[i],y)
        b[j] = lcm(b[j],x)
sum = 0
for i in range(n):
    sum += b[i]
print(int(sum%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
import math

def lcm(a,b):
    return (a*b)//math.gcd(a,b)

n = int(input())
b = [1]*(n+5)
mod = 1e9 + 7
a = [int(i) for i in input().split()]
    
for i in range(n):
    for j in range(i+1,n):
        x = a[i]
        y = a[j]
        m = math.gcd(x,y)
        x //= m
        y //= m
        b[i] = lcm(b[i],y)
        b[j] = lcm(b[j],x)
sum = 0
for i in range(n):
    sum += b[i]
print(int(sum%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
import math

def lcm(a,b):
    return (a*b)//math.gcd(a,b)

n = int(input())
b = [1]*(n+5)
mod = 1e9 + 7
a = [int(i) for i in input().split()]
    
for i in range(n):
    for j in range(i+1,n):
        x = a[i]
        y = a[j]
        m = math.gcd(x,y)
        x //= m
        y //= m
        b[i] = lcm(b[i],y)
        b[j] = lcm(b[j],x)
sum = 0
for i in range(n):
    sum += b[i]
print("%d" %(sum%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
b = [1]*(n+1)
mod = 1e9 + 7
a = [int(i) for i in input().split()]
    
for i in range(n):
    for j in range(i+1,n):
        x = a[i];y = a[j];m = math.gcd(x,y);
        x //= m;y //= m;
        b[i] = int(b[i]*y)//int(math.gcd(b[i],y))
        b[j] = int(b[j]*x)//int(math.gcd(b[j],x))
sum = 0
for i in range(n):
    sum += b[i]
print("%d" %(sum%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
b = [1]*(n+1)
mod = 1e9 + 7
a = [int(i) for i in input().split()]
    
for i in range(n):
    for j in range(i+1,n):
        x = a[i];y = a[j];m = math.gcd(x,y);
        x //= m;y //= m;
        b[i] = int(b[i]*y)//int(math.gcd(b[i],y))
        b[j] = int(b[j]*x)//int(math.gcd(b[j],x))
sum = 0
for i in range(n):
    sum += b[i]
print("%d" %(sum%mod))


Fixed submission:
def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
n=int(input())
mod=1000000007
s=[int(i) for i in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)