Buggy python submission (verdict: Runtime Error):
# input
N = int(input())
A = [int(x) for x in input().split()]

# Common divisor
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義

def gcd_wrapper(x, y):
    if x >= y:
        return gcd(x, y)
    else:
        return gcd(y, x)

if N == 2:
    print(max(A))
else:
    CD = []
    CD_alt = []
    for index, array_val in enumerate(A):
        if index != 0:
            CD.append(gcd_wrapper(A[0], array_val))
        if index != 1:
            CD_alt.append(gcd_wrapper(A[1], array_val))
    sorted_CD = sorted(CD)
    sorted_CD_alt = sorted(CD_alt)
    print(max([max(sorted_CD[0:2]), max(sorted_CD_alt[0:2])]))

Fixed submission:
from math import floor

# input process
inputData = input().split()
# A秒後
A = int(inputData[0])
# B枚ずつ
B = int(inputData[1])
# T+0.5秒後まで
T = int(inputData[2])

# calculation process
prodCount = int(floor((float(T) + 0.5) // float(A)))
biscuitTotal = prodCount * B

# output process
print(biscuitTotal)

Buggy python submission (verdict: Runtime Error):
# input
N = int(input())
A = [int(x) for x in input().split()]

# Common divisor
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義

def gcd_wrapper(x, y):
    if x >= y:
        return gcd(x, y)
    else:
        return gcd(y, x)

if N == 2:
    print(max(A))
else:
    CD = []
    CD_alt = []
    for index, array_val in enumerate(A):
        if index != 0:
            CD.append(gcd_wrapper(A[0], array_val))
        if index != 1:
            CD_alt.append(gcd_wrapper(A[1], array_val))
    sorted_CD = sorted(CD)
    sorted_CD_alt = sorted(CD_alt)
    if sorted_CD[0] == sorted_CD[1]:
        result = sorted_CD[0]
    else:
        result = sorted_CD[1]
    if sorted_CD_alt[0] == sorted_CD_alt[1]:
        result_alt = sorted_CD_alt[0]
    else:
        result_alt = sorted_CD_alt[1]
    print(max([result, result_alt]))

Fixed submission:
from math import floor

# input process
inputData = input().split()
# A秒後
A = int(inputData[0])
# B枚ずつ
B = int(inputData[1])
# T+0.5秒後まで
T = int(inputData[2])

# calculation process
prodCount = int(floor((float(T) + 0.5) // float(A)))
biscuitTotal = prodCount * B

# output process
print(biscuitTotal)

Buggy python submission (verdict: Runtime Error):
import heapq

# input
N = int(input())
A = [int(x) for x in input().split()]

# Common divisor
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

CD = []
for i in A[1:]:
    if A[0] >= i:
        CD.append(gcd(A[0], i))
    else:
        CD.append(gcd(i, A[0]))


print(max(heapq.nsmallest(2, CD)))

Fixed submission:
from math import floor

# input process
inputData = input().split()
# A秒後
A = int(inputData[0])
# B枚ずつ
B = int(inputData[1])
# T+0.5秒後まで
T = int(inputData[2])

# calculation process
prodCount = int(floor((float(T) + 0.5) // float(A)))
biscuitTotal = prodCount * B

# output process
print(biscuitTotal)

Buggy python submission (verdict: Runtime Error):
import heapq

# input
N = int(input())
A = [int(x) for x in input().split()]

# Common divisor
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義

CD = []
for i in A[1:]:
    if A[0] >= i:
        CD.append(gcd(A[0], i))
    else:
        CD.append(gcd(i, A[0]))


print(min(heapq.nlargest(2, CD)))

Fixed submission:
from math import floor

# input process
inputData = input().split()
# A秒後
A = int(inputData[0])
# B枚ずつ
B = int(inputData[1])
# T+0.5秒後まで
T = int(inputData[2])

# calculation process
prodCount = int(floor((float(T) + 0.5) // float(A)))
biscuitTotal = prodCount * B

# output process
print(biscuitTotal)

Buggy python submission (verdict: Runtime Error):
import heapq

# input
N = int(input())
A = [int(x) for x in input().split()]

# N = 3
# A = [12, 15, 18]
# A = [random.randint(0, 1000000) for i in range(100)]
# process

# Common divisor
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義

CD = []
for i in A[1:]:
    if A[0] >= i:
        CD.append(gcd(A[0], i))
    else:
        CD.append(gcd(i, A[0]))


print(min(heapq.nlargest(2, CD)))






Fixed submission:
from math import floor

# input process
inputData = input().split()
# A秒後
A = int(inputData[0])
# B枚ずつ
B = int(inputData[1])
# T+0.5秒後まで
T = int(inputData[2])

# calculation process
prodCount = int(floor((float(T) + 0.5) // float(A)))
biscuitTotal = prodCount * B

# output process
print(biscuitTotal)