Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c/A_
print(int(a%w))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=((a+c//A_)*c_/c)%w
    #a=(a*c_//c+c_//A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=((a+c//)*c_/c)%w
    #a=(a*c_//c+c_//A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=((a+c/A_)*c_//c)%w
    #a=(a*c_//c+c_//A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=(a*c_/c+c_//A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=(a*c_//c+c_/A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=(a*c_//c+c_//A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c_=c*A_//fractions.gcd(c,A_)
    a=(a*c_/c+c_/A_)%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for i in range(N):
    c_=c*A[i]//fractions.gcd(c,A[i])
    a=(a*c_//c+c_//A[i])%w
    c=c_
print(int(a))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for i in range(N):
    c_=c*A[i]//fractions.gcd(c,A[i])
    a=a*c_/c+c_/A[i]
    c=c_
print(int(a%w))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))

Buggy python submission (verdict: Runtime Error):
import math
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for i in range(N):
    c_=c*A[i]//math.gcd(c,A[i])
    a=a*c_/c+c_/A[i]
    c=c_
print(int(a%w))

Fixed submission:
import fractions
N=int(input())
A=list(map(int,input().split()))
c=1
a=0
w=10**9+7
for A_ in A:
    c=c*A_//fractions.gcd(c,A_)
for A_ in A:
    a+=c//A_
print(int(a%w))