Buggy python submission (verdict: Time Limit Exceeded):
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
ans = sum(tmp//a for a in arr)
ans = ans % (10**9+7)
print(ans)

Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
import sys
from fractions import gcd
input = sys.stdin.readline
def lcm(a, b):
    return a*b//gcd(a, b)

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum(tmp/a for a in arr)
ans = ans % (1e+9+7)
print(int(ans))

Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
import sys
from fractions import gcd
input = sys.stdin.readline
def lcm(a, b):
    return a*b//gcd(a, b)

n = input()
arr = map(int, input().split())
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum(tmp/a for a in arr)
ans = ans % (1e+9+7)
print(int(ans))

Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
from fractions import gcd
def lcm(a, b):
    return a*b//gcd(a, b)
n = input()
arr = input().split(' ')
arr = [int(a) for a in arr]
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum([tmp/a for a in arr])
ans = int(ans % (1e+9+7))
print(ans)


Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
from math import gcd
def lcm(a, b):
    return a*b//gcd(a, b)
n = input()
arr = input().split(' ')
arr = [int(a) for a in arr]
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum([tmp/a for a in arr])
ans = int(ans % (1e+9+7))
print(ans)

Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
n = input()
arr = input().split(' ')
arr = [int(a) for a in arr]
# arr = [12, 1, 12, 12, 12]
def gcd(a, b):
    while b is not 0:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a *b//gcd(a, b)
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum([tmp/a for a in arr])
ans = int(ans % (1e+9+7))
print(ans)


Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
n = input()
arr = input().split(' ')
arr = [int(a) for a in arr]
arr = [a for a in arr if a!=0]
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a *b//gcd(a, b)
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum([int(tmp/a) for a in arr])
ans = int(ans % (1e+9+7))
print(ans)


Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))

Buggy python submission (verdict: Runtime Error):
n = input()
arr = input().split(' ')
arr = [int(a) for a in arr]
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a *b//gcd(a, b)
tmp = arr[0]
for i in range(len(arr)-1):
    tmp = lcm(tmp,arr[i+1])
ans = sum([int(tmp/a) for a in arr])
ans = int(ans % (1e+9+7))
print(ans)


Fixed submission:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
print(sum(tmp//a for a in arr) % (10**9+7))