Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
import itertools

limit_num = int(input())

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

result = 0
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))
print(sum(result_list))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
import itertools

limit_num = int(input())

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

result = 0

for num in list(itertools.product(range(1, limit_num + 1), repeat=3)):
	result += gcd(num)

print(str(result))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
import itertools

limit_num = int(input())

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

result = 0

for num in list(itertools.product(range(1, limit_num + 1), repeat=3)):
	result += gcd(num)

print(int(result))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
import itertools

limit_num = int(input())

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

result = 0

num_list = list(itertools.product(range(1, limit_num + 1), repeat=3))
for num in num_list:
	result = result + gcd(num)

print(int(result))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))

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

limit_num = int(input())

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

result = 0
num_list =[1, 1, 1]

for num_1 in range(num_list[0], limit_num + 1):
	for num_2 in range(num_list[1], limit_num + 1):
		for num_3 in range(num_list[2], limit_num + 1):
			result = result + gcd([num_1, num_2, num_3])

print(int(result))


Fixed submission:
import math
from functools import reduce
import itertools

def gcd(*numbers):
	return reduce(math.gcd, *numbers)

limit_num = int(input())
result_list = []
for num in itertools.product(range(1, limit_num + 1), repeat=3):
	result_list.append(gcd(num))

print(sum(result_list))