Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(int(ans))
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a / g * b
	
if __name__ == "__main__":
	main()
	

Fixed submission:
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(ans)
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = clocks[0]
	for clock in clocks:
		if clock == ans: continue
		ans = lcm(ans, clock)
	print(int(ans))
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a / g * b
	
if __name__ == "__main__":
	main()
	

Fixed submission:
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(ans)
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	clock_max_i = clocks.index(max(clocks))
	times = copy.deepcopy(clocks)
	while True:
		flg = True
		max_num = max(times)
		for i, time in enumerate(times):
			if max_num == time : continue
			
			tmp = max_num // clocks[i]
			times[i] = clocks[i] * tmp
			if max_num != times[i]:
				flg = False
			
		if flg:
			print(times[0])
			sys.exit()
		else:
			times[clock_max_i] = times[clock_max_i] + clocks[clock_max_i]
			
if __name__ == "__main__":
	main()
	

Fixed submission:
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(ans)
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	times = copy.deepcopy(clocks)
	while True:
		flg = True
		max_num = max(times)
		for i, time in enumerate(times):
			if max_num == time : continue
			
			tmp = max_num // time
			times[i] = times[i] * tmp
			if max_num != times[i]:
				flg = False
			
		if flg:
			print(times[0])
			sys.exit()
		else:
			p = times.index(max_num)
			times[p] = times[p] + clocks[p]
			max_num = times[p]
			
if __name__ == "__main__":
	main()
	

Fixed submission:
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(ans)
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	times = copy.deepcopy(clocks)
	while True:
		max_num = max(times)
		for i, time in enumerate(times):
			if max_num == time : continue
			
			tmp = max_num // time
			times[i] = times[i] * tmp
			
		flg = True
		num = times[0]
		for time in times:
			if num != time:
				flg = False
				
		if flg:
			print(num)
			sys.exit()
		else:
			for i, time in enumerate(times):
				if max_num == time:
					times[i] = times[i] + clocks[i]
					max_num = times[i]
					break
			
if __name__ == "__main__":
	main()
	

Fixed submission:
# -*- coding: utf-8 -*-
import sys
import copy

def main():
	num = int(input())
	
	clocks = []
	for _ in range(num):
		clock = int(input())
		clocks.append(clock)
		
	ans = 1
	for clock in clocks:
		ans = lcm(ans, clock)
	print(ans)
			
def gcd(a, b):
	if a > b:
		a, b = b, a
		
	while a > 0:
		a, b = b % a, a
	return b
	
def lcm(a, b):
	g = gcd(a, b)
	return a // g * b
	
if __name__ == "__main__":
	main()