Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
N = int(input())
A_list = input().split()
A_list_i = [int(s, 0) for s in A_list]
max_gcd = 1
min_gcd = [10000000000, -1]
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp
        if temp < min_gcd[0]:
            min_gcd[0] = temp
            if A_list_i[i] > A_list_i[j]:
                min_gcd[1] = i
            else:
                min_gcd[1] = j
A_list_i[min_gcd[1]] = max_gcd
temp = 0
max_gcd = 1
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp            
print('%d' % max_gcd)

    N = int(input())
    A_list = input().split()
    A_list_i = [int(s, 0) for s in A_list]
    max_gcd = 1
    min_gcd = [10000000000, -1]
    for i in range(N-1):
        for j in range(i+1, N):
            if A_list_i[i] == A_list_i[j]:
                temp = A_list_i[i]
            elif A_list_i[i] > A_list_i[j]:
                temp = A_list_i[i] % A_list_i[j]
            else:
                temp = A_list_i[j] % A_list_i[i]
            if temp > max_gcd:
                max_gcd = temp
            if temp < min_gcd[0]:
                min_gcd[0] = temp
                if A_list_i[i] > A_list_i[j]:
                    min_gcd[1] = i
                else:
                    min_gcd[1] = j
    A_list_i[min_gcd[1]] = max_gcd
    temp = 0
    max_gcd = 1
    for i in range(N-1):
        for j in range(i+1, N):
            if A_list_i[i] == A_list_i[j]:
                temp = A_list_i[i]
            elif A_list_i[i] > A_list_i[j]:
                temp = A_list_i[i] % A_list_i[j]
            else:
                temp = A_list_i[j] % A_list_i[i]
            if temp > max_gcd:
                max_gcd = temp            
    print('%d' % max_gcd)

N = int(input())
A_list = input().split()
A_list_i = [int(s, 0) for s in A_list]
max_gcd = 0
min_gcd = [10000000000, -1]
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp
        if temp < min_gcd[0]:
            min_gcd[0] = temp
            if A_list_i[i] > A_list_i[j]:
                min_gcd[1] = i
            else:
                min_gcd[1] = j
A_list_i[min_gcd[1]] = max_gcd
temp = 0
max_gcd = 0
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp            
print('%d' % max_gcd)

raw_input = input()
a, b, t = map(int, raw_input.split())
counter = (t+0.5)//a 
number = b * counter 
print('%d' % number)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted