Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [0] * n
for i in range(n):
    arr[i] = LCM // a[i]
print(sum(arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [0] * n
for i in range(n):
    arr[i] = LCM // a[i]
print(sum(arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [0] * n
for i in range(n):
    arr[i] = LCM // a[i]
print(sum(arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
def arr(lis):
    return functools.reduce(lcm, lis)

n = int(input())
a = [int(_) for _ in input().split()]
LCM = arr(a)

arr = [0] * n
for i in range(n):
    arr[i] = LCM // a[i]
print(sum(arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

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

    n = int(input())
    a = [int(_) for _ in input().split()]
    LCM = functools.reduce(lambda x, y : lcm(x, y), a)

    arr = [0] * n
    for i in range(len(a)):
        arr[i] = LCM // a[i]
    print(sum(arr) % MOD)

if __name__ == '__main__':
    main()


Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = functools.reduce(lambda x, y : lcm(x, y), a)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = functools.reduce(lambda x, y : lcm(x, y), a)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = functools.reduce(lambda x, y : lcm(x, y), a, 1)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import functools

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = functools.reduce(lambda x, y : lcm(x, y), a, 1)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions
import sys

MOD = 10**9+7
input = sys.stdin.readline

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = 1
for i in a:
    LCM = lcm(LCM, i)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = 1
for i in a:
    LCM = lcm(LCM, i)

ans_arr = [0] * n
for i in range(len(a)):
    ans_arr[i] = LCM // a[i]
print(sum(ans_arr) % MOD)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
from functools import reduce

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lambda x, y: lcm(x, y), a)

ans = 0
for i in a:
    ans += LCM // i
    ans %= MOD
print(ans)


Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = 1
for i in a:
    LCM = lcm(LCM, i)

ans = 0
for i in a:
    ans += LCM // i
    ans %= MOD
print(ans)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

MOD = 10**9+7

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = 1
for i in a:
    LCM = lcm(LCM, i)

ans = 0
for i in a:
    ans += LCM // i
    ans %= MOD
print(ans)

Fixed submission:
from fractions import gcd
from functools import reduce

MOD = 1000000007

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

n = int(input())
a = [int(_) for _ in input().split()]
LCM = reduce(lcm, a)

arr = [LCM // _ for _ in a]
print(sum(arr) % MOD)