Buggy python submission (verdict: Runtime Error):
import functools
import fraction

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))


Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

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

def blcm(x, y):
	return (x*y)//math.gcd(x, y)

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))


Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

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

def slcm(numbers):
	return functools.reduce((lambda x,y:x*y//math.gcd(x, y)), numbers)
	
input()
numbers=list(map(int,input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))


Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

Buggy python submission (verdict: Runtime Error):
import functools
import math
def slcm(numbers):
	return functools.reduce((lambda x,y:x*y//math.gcd(x, y)), numbers)
	
input()
numbers=list(map(int,input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))


Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

Buggy python submission (verdict: Runtime Error):
import functools
import math
def slcm(numbers):
	return functools.reduce(lambda x,y:x*y//math.gcd(x,y),numbers)

input()
numbers=list(map(int,input().split()))
num=slcm(numbers)-1
print(sum([num%i for i in numbers]))

Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

Buggy python submission (verdict: Runtime Error):
import functools
import math
def slcm(numbers):
	return functools.reduce(lambda x,y:x*y//math.gcd(x,y),numbers)

input()
numbers=list(map(int,input().split()))
num=slcm(numbers)-1
print(sum([num%i for i in numbers]))

Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))

Buggy python submission (verdict: Runtime Error):
import functools
import math
def slcm(numbers):
	return functools.reduce(lambda x,y:x*y//math.gcd(x,y),numbers)

input()
numbers=list(map(int,input().split()))
num=slcm(numbers)-1
print(sum([num%i for i in numbers]))

Fixed submission:
import functools
import fractions

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

def slcm(numbers):
	return functools.reduce(blcm, numbers)
	
input()
numbers=list(map(int, input().split()))
num=slcm(numbers)-1
nums=[num%i for i in numbers]
print(sum(nums))