Problem:


Score : 100 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq A, B, T \leq 20

Input

Input is given from Standard Input in the following format:

A B T

Output

Print the total number of biscuits produced within T + 0.5 seconds after activation.

Sample Input 1

3 5 7

Sample Output 1

10

Five biscuits will be produced three seconds after activation.

Another five biscuits will be produced six seconds after activation.

Thus, a total of ten biscuits will be produced within 7.5 seconds after activation.

Sample Input 2

3 2 9

Sample Output 2

6

Sample Input 3

20 20 19

Sample Output 3

0



Sample input:
3 5 7


Sample output:
10

Submission status: Runtime Error

Solution code:
a, b, t = map(int, input().split())
return (t % a) * b

Submission status: Runtime Error

Solution code:
A, B, T = input()
ans = ((T + 0.5) // A) * B
print(ans)

Submission status: Runtime Error

Solution code:
Main.py
A, B, T = input()
n = (T + 0.5) // A
tot_biscuits = B * n
print(int(tot_biscuits))

Submission status: Runtime Error

Solution code:
Main.py
A, B, T = input()
n = (T + 0.5) // A
tot_biscuits = B * n
print(tot_biscuits)

Submission status: Runtime Error

Solution code:
B*((T+0.5)//A)

Submission status: Runtime Error

Solution code:
A = biscuit_make[0]
B = biscuit_make[1]
T = biscuit_make[2]
time = [1, 2, 3, 4, 5, 6, 7, 8, 9]  # 秒数をリスト化
T = int(T)                          # TをInt型に
result = []                         # 空のリストresultを作成
for num in time:                    # for文でtime配列をAに掛けていく

    num2 = num * int(A)             # 掛けた結果をnum2に格納
    if num2 <= T + 0.5:             # num2が(T+0.5)以下であればresultに格納
        result.append(num * int(B))
    else:
        result.append(0)
print(max(result))                  # 結果の最大値を出力

Submission status: Runtime Error

Solution code:
n = int(input())
in_num = input().split()
lis_num = [int(s) for s in in_num]
m = max(lis_num)

x = [lis_num[i] % m for i in range(n)]
sx = max(x.remove(max(x)))
m2 = max(lis_num.remove(m))
y = [lis_num[i] % m2 for i in range(n)]
sy = max(y.remove(max(y)))
if sx == 0:
  ans = m
elif sy == 0:
  ans = m2
else:
  for i in range((m+1)//2, 0, -1):
    x = [lis_num[j] % i for j in range(n)]
    sx = max(x.remove(max(x)))
    if sx == 0:
      ans = i
      break
    else:
      continue
print(ans)

Submission status: Runtime Error

Solution code:
def gcd(a,b):
    l = max(a,b)
    s = min(a,b)
    if s == 0:
        return l
    else:
        return gcd(s, l%s)

n = int(input())
a = [0] + list(map(int, input().split())) + [0]
max_gcd = 1
L = [0] * (n+2)
R = [0] * (n+2)

for i in range(1,n+2):
    L[i] = gcd(a[i],L[i-1])
    R[n+1-i] = gcd(a[n+1-i], R[n+2-i])
for i in range(1,n+1):
    max_gcd = max(L[i-1], R[i+1])

print(max_gcd)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
T = input()

t = T+0.5
k = t//A
x = k*B

print(x)

Submission status: Runtime Error

Solution code:
A = int(input('A:'))
B = int(input('B:'))
T = int(input('T:'))

t = T+0.5
k = t//A
x = k*B

print(x)

Submission status: Runtime Error

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()

chars = list(s)
chars[int(k)-1]=chars[int(k)-1].lower()
correct = "".join(chars)
print(correct)

Submission status: Runtime Error

Solution code:
A,B,T = map(int, input()split())
X = (T+0.5)/A
print(B*X)

Submission status: Runtime Error

Solution code:
a = int()
b = int()
t = int()
print(b*(t/a))

Submission status: Runtime Error

Solution code:
a = input()
b = input()
t = input()
print(b*(t/a))

Submission status: Runtime Error

Solution code:
a:int
  b:int
    t:int
      b*(t/a)

Submission status: Runtime Error

Solution code:
a,b,t:int
  b*(t/a)

Submission status: Runtime Error

Solution code:
def biscuit(A,B,T):
  a = A
  	while a < T:
      s =(T/a)*B
      a += a
      end
      
      s

Submission status: Runtime Error

Solution code:
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0

# 価値 - コスト > 0 のフィルタ
for i in range(N):
    s = V[i] - C[i]
    if s > 0:
        ans += s

print(ans)

Submission status: Runtime Error

Solution code:
N = input()
V = list(map(int, input().split()))
C = list(map(int, input().split()))
XY = 0
for i in range(len(V)):
    if V[i] - C[i] > 0:
        XY += V[i] - C[i]

print(XY)

Submission status: Runtime Error

Solution code:
import fractions
def mygcd(N,A,S):
    if S == 'R':
        A.reverse()
    ans = [0, A[0]]
    for i in range(1, N):
        ans.append(fractions.gcd(ans[i],A[i]))
    if S == 'R':
        ans.reverse()
    return ans

def GCDonBlack(N,A):
    L = mygcd(N,A,'L')
    R = mygcd(N,A,'R')
    M = [fractions.gcd(L[i], R[i+1])  for i  in range(0,N)]
    return max(M)

N = int(input())
A = list(map(int, input().split()))
print(GCDonBlack(N,A))

Submission status: Runtime Error

Solution code:
k = (int(t) + 0.5) // int(a)
i = int(k) * int(b)
print(i)

Submission status: Runtime Error

Solution code:
A,B,T = input().split()
print(int((T//A)*B)

Submission status: Runtime Error

Solution code:
A, B, T = int(x) for x in input().split()

print((T//A)*B)

Submission status: Runtime Error

Solution code:

print(mod(T/A)*B)

Submission status: Runtime Error

Solution code:
#import math
#from fractions import gcd
import fractions
from functools import reduce

n = int(input())
nums = [int(i) for i in input().split()]

def gcd(nums):
#    return reduce(math.gcd, nums)
    return reduce(fractions.gcd, nums)

gcdOrg = gcd(nums)
gcdMax = gcdOrg

for i in range(n):
    tempList = list(nums)
    del tempList[i]

    #temp = gcd(filter(index == i, nums))
    temp = gcd(tempList)

    if temp > gcdMax:
        gcdMax = temp

#print(gcdOrg)
print(gcdMax)

Submission status: Runtime Error

Solution code:
n = int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
sum = 0

for v, c in zip(v_list, c_list):
    if v - c > 0:
        sum += v - c

print(sum)

Submission status: Runtime Error

Solution code:
A, B, T = map(int, input().split())

def biscuit_gen(A,B,T):
    total = 0
    num = int(T//A)
    return B*num

print(biscuit_gen(A,B,t))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

coef = 1

while C + 0.5 > (coef + 1) * A:
    coef += 1

print(B * coef)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()

coef = 1

while C + 0.5 > (coef + 1) * A:
    coef += 1

print(B * coef)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
n=0
for i in range(len(A)):
    if A[i]<0:
        n+=1
if n%2==0:
    ans=0
    for i in range(len(A)):
        ans+=abs(A[i])
if n%2==1:
    B=A
    for i in range(len(A)):
        B[i]=abs(A[i])
    minn=min(B)
    ans=0
    for i in range(len(A)):
        ans+=B[i]
    ans-=2*minn
print(ans)

Submission status: Runtime Error

Solution code:
a,b,t = list(map(int,input().split()))
printf(t//a * b)

Submission status: Runtime Error

Solution code:
argv = sys.argv
a = int(input())


b = int(input())

t = int(input()) + 0.5 - a

r = 0

while t > 0:
    r += b
    t -= a

print(r)

Submission status: Runtime Error

Solution code:
import sys

argv = sys.argv
a = int(argv[1])
b = int(argv[2])
t = int(argv[3]) + 0.5 - a

r = 0

while t > 0:
    r += b
    t -= a

print(r)

Submission status: Runtime Error

Solution code:
inputs = map(int, list(input()))
A, B, T = inputs

print(T // A * B)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
T=int(input())
reward=0
time=0

for t in range(T):
    time += 1
    if time%A == 0:
        reward = reward + B
        
print(reward)

Submission status: Runtime Error

Solution code:
aaa

Submission status: Runtime Error

Solution code:
A,B,T = map(int,input().split)

def main(A,B,T):
    time = A
    sum = 0
    while time <= T+0.5:
        if time%A == 0:
            sum += B
            time += 1
    print(sum)
    return 0

Submission status: Runtime Error

Solution code:
import fractions
def gcd_list(list1):
    ans=list1[0]
    for i in range(len(list1)):
        ans=fractions.gcd(ans,list1[i])
    return ans
N=int(input())
A=list(map(int,input().split()))
n=0
for i in range(N):
    b=A[i]
    A.remove(A[i])
    m=gcd_list(A)
    n=max(n,m)
    A.insert(i,b)
print(n)

Submission status: Runtime Error

Solution code:
A, B, T = input().split()
print((T/A)*B)

Submission status: Runtime Error

Solution code:
A, B, T = input().split( )
print(int(T/A)*B)

Submission status: Runtime Error

Solution code:
A, B, T = input().sprit()
print(int(T/A)*B)

Submission status: Runtime Error

Solution code:
A, B, T = input().split()
print(int(T/A)*B)

Submission status: Runtime Error

Solution code:
import fractions
N = int(input())
values = ([int(x) for x in input().split()])

gcd_from_the_left = []
gcd_from_the_left.append(values[0])
for i in range(N):
	gcd_from_the_left.append(fractions.gcd(gcd_from_the_left[i],values[i]))
gcd_from_the_left.pop(0)

gcd_from_the_right = []
gcd_from_the_right.append(values[-1])
for i in range(N):
	gcd_from_the_right.append(fractions.gcd(gcd_from_the_right[i],values[-i-1]))

gcd_from_the_right.pop(0)

ans = 0
gcd = 0

for i in range(N):
  gcd = fractions.gcd(gcd_from_the_left[i],gcd_from_the_right[-N])
  if gcd > ans:
    ans = gcd
    
gcd = gcd_from_the_left[-2]
if gcd > ans:
  ans = gcd
gcd = gcd_from_the_right[-2]
if gcd > ans:
  ans = gcd
print(ans)

Submission status: Runtime Error

Solution code:
import fractions
N = int(input())
values = ([int(x) for x in input().split()])

gcd_from_the_left = []
gcd_from_the_left.append(values[0])
for i in range(len(values)):
	gcd_from_the_left.append(fractions.gcd(gcd_from_the_left[i],values[i]))
gcd_from_the_left.pop(0)

gcd_from_the_right = []
gcd_from_the_right.append(values[-1])
for i in range(len(values)):
	gcd_from_the_right.append(fractions.gcd(gcd_from_the_right[i],values[-i-1]))

gcd_from_the_right.pop(0)

ans = 0
gcd = 0

for i in range(len(gcd_from_the_left)):
  if i==0:
    gcd = gcd_from_the_right[-2]
  if i==len(gcd_from_the_left):
    gcd = gcd_from_the_left[i]
  if 0<i<len(gcd_from_the_left):
    gcd = fractions.gcd(gcd_from_the_left[i],gcd_from_the_right[len(gcd_from_the_left)-i-2])
  if gcd > ans:
    ans = gcd
print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, T;
  cin >> A >> B >> T;
  cout << (T/A) * B << endl; 
}

Submission status: Runtime Error

Solution code:
A,B,T=int().split()
print((T//A)*B)

Submission status: Runtime Error

Solution code:
int()=A,B,T
print((T//A)*B)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
T = input()
print (T//A) * B

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, T;
  cin >> A >> B >> T;
  cout << (T/A) * B << endl;
}

Submission status: Runtime Error

Solution code:
import fractions                                                                                                                                             
                                                                                                                                                             
if __name__ == '__main__':                                                                                                                                   
    N = int(input())                                                                                                                                         
    A = list(map(int,input().split()))                                                                                                                       
                                                                                                                                                             
    L = [0] * N                                                                                                                                              
    R = [0] * N                                                                                                                                              
                                                                                                                                                             
    L[0] = A[0]                                                                                                                                              
    for i in range(1,N):                                                                                                                                     
        L[i] = fractions.gcd(L[i-1],A[i])                                                                                                                    
                                                                                                                                                             
    R[-1] = A[-1]                                                                                                                                            
    for i in range(N-2,-1,-1):                                                                                                                               
        R[i] = fractions.gcd(R[i+1],A[i])                                                                                                                    
                                                                                                                                                             
    res = max(R[1],L[-1])                                                                                                                                    
    for i in range(1,N-1):                                                                                                                                   
        res = max(res,fractions.gcd(L[i-1],R[i+1]))                                                                                                          
                                                                                                                                                             
    print(res)

Submission status: Runtime Error

Solution code:
import fractions                                                                                                                                             
                                                                                                                                                             
if __name__ == '__main__':                                                                                                                                   
    N = int(input())                                                                                                                                         
    A = list(map(int,input().split()))                                                                                                                       
                                                                                                                                                             
    L = [0] * N                                                                                                                                              
    R = [0] * N                                                                                                                                              
                                                                                                                                                             
    L[0] = A[0]                                                                                                                                              
    for i in range(1,N):                                                                                                                                     
        L[i] = fractions.gcd(L[i-1],A[i])                                                                                                                    
                                                                                                                                                             
    R[-1] = A[-1]                                                                                                                                            
    for i in range(N-2,-1,-1):                                                                                                                               
        R[i] = fractions.gcd(R[i+1],A[i])                                                                                                                    
                                                                                                                                                             
    res = max(R[1],L[-1])                                                                                                                                    
    for i in range(1,N-1):                                                                                                                                   
        res = max(res,fractions.gcd(R[i-1],L[i+1]))                                                                                                          
                                                                                                                                                             
    print(res)

Submission status: Runtime Error

Solution code:
import fractions                                                                                                                                             
                                                                                                                                                             
if __name__ == '__main__':                                                                                                                                   
    N = int(input())                                                                                                                                         
    A = list(map(int,input().split()))                                                                                                                       
                                                                                                                                                             
    L = [0] * N                                                                                                                                              
    R = [0] * N                                                                                                                                              
                                                                                                                                                             
    L[0] = A[0]                                                                                                                                              
    for i in range(1,N):                                                                                                                                     
        L[i] = fractions.gcd(L[i-1],A[i])                                                                                                                    
                                                                                                                                                             
    R[-1] = A[-1]                                                                                                                                            
    for i in range(N-2,-1,-1):                                                                                                                               
        R[i] = fractions.gcd(R[i+1],A[i])                                                                                                                    
                                                                                                                                                             
    res = max(R[1],L[-1])                                                                                                                                    
    for i in range(1,N-1):                                                                                                                                   
        res = max(res,fractions.gcd(L[i-1],R[i+1]))                                                                                                          
                                                                                                                                                             
    print(res)

Submission status: Runtime Error

Solution code:
A, B, T = map(int, input().split)
print(T//A*B)

Submission status: Runtime Error

Solution code:
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

for i in range(N):
    if V[i] <= C[i]:
        continue
    Max = Max + V[i] - C[i]
print(Max)

Submission status: Runtime Error

Solution code:
N = int(input())
T = list(map(int,input().split()))
T.sort()
ANSL = []
for i in range(len(T)):
    S = []
    for j in range(len(T)):
        S.append(T[j])
    S.pop(i)
    ANS = 0
    while True:
        S.sort()
        LIS = []
        if S[0] == 1:
            ANS += 1
            break
        elif len(S) == 1:
            ANS += S[0]
            break
        else:
            LIS.append(S[0])
            for k in range(len(S)-1):
                if (S[k+1] % S[k] == 0) or (S[k+1] % LIS[0] == 0):
                    continue
                else:
                    LIS.append(S[k+1] % S[k])
                    LIS.sort()
        S = LIS
    ANSL.append(ANS)
print(max(ANSL))

Submission status: Runtime Error

Solution code:
n = input().strip().split(" ")
N = int(n)
print(N[1]*N[2]//N[1])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
A = int(input())
if A < 1:
    print('×')
else:
    B = int(input())
    if B < 0:
        print('×')
    else:    
        T = int(input())
        if T < 0 and T > 20:
            print('×')
        else:                    
            T+=0.5
            ans = (T // A) *B
            print(ans)

Submission status: Runtime Error

Solution code:
A= int(input())
B= int(input())
T= int(input())
TT = T +1
sum=0

for num in range(0,TT,A):
  if(num%A==0 and num!=0):
        sum+=B
print(sum)

Submission status: Runtime Error

Solution code:
A= int(input())
B= int(input())
T= int(input())

sum=0

for num in range(0,T,A):
  if(num%A==0 and num != 0):
        sum+=B
print(sum)

Submission status: Runtime Error

Solution code:
A= 3
B= 5
T= 7

sum=0

for num in range(0,T,A):
  if(num%A==0 && num != 0)
        sum+=B
print(sum)

Submission status: Runtime Error

Solution code:
a = int(input())
b= int(input())
c = int(input())
x= int(input())
ans=0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if i*500+j*100+k*50==x:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
from fractions import gcd
n = int(input())
li = list(map(int, input().split()))
lil = [0]*n
lir = [0]*n
for k in range(n):
  if k == 0:
    lil[k] = li[0]
    lir[k] = li[-1]
  else:
    lil[k] = gcd(lil[k-1], li[k])
    lir[k] = gcd(lir[k-1], li[-k-1])
    
lir = lir[::-1]
tmp = max(gcd(lil[j-1], lir[j+1]) for j in range(1, n-1))
print(max(tmp, lir[1], lil[-2]))

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
t=int(input())+0.5
bis=0
for i in range(0,int(t/a)):
    bis+=b
print(bis)

Submission status: Runtime Error

Solution code:
A , B , T = map(int , input()split())

count =  T // A * B

print(count)

Submission status: Runtime Error

Solution code:
# coding:UTF-8

# 入力値の受け取り
'''
input_list[0]→A
input_list[1]→B
input_list[2]→T
'''
input_list = input().split()

# 合計枚数の算出
print((input_list[2] + 0.5) // input_list[0] * input_list[1])

Submission status: Runtime Error

Solution code:
time = T + 0.5
bisckets = (time //   A) * B

print(bisckets)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

N = int(input())
V = map(int, input().split())
C = map(int, input().split())

gain = 0
for i in range(0,N):
    if(V[i]>C[i]):
        gain += V[i] - C[i]

print(gain)

Submission status: Runtime Error

Solution code:
int A, B, T = 0;

for A in range(T + 0,5)    
    B = B + AB;

Submission status: Runtime Error

Solution code:
num =int(input())
value = list(map(int, input().split()))
value.sort()
point = 0
for i in range (0, value[0]):
  cnt = 0
  for j in range(0, num):
    if value[j]%(value[0]-i)!=0:
      cnt += 1
      point = j
  if cnt == 1 or cnt == 0:
    break
print(value[0] - i)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
A = list(map(int, input().split()))

X1 = [0] * (N+2)
X2 = [0] * (N+2)

for i in range(N):
    X1[i+1] = math.gcd(X1[i], A[i])
for i in range(N,0,-1):
    X2[i] = math.gcd(X2[i+1], A[i-1])

ans = 1
for i in range(N):
    G = math.gcd(X1[i], X2[i+2])
    if ans < G:
        ans = G
print(ans)

Submission status: Runtime Error

Solution code:
#import math
from functools import reduce

def gcd(a,b):
    if b>a:
        a, b = b, a
    while b:
        a, b = b, a%b
    return a

def gcds(nums):
    return reduce(gcd, nums)

a = int(input())
a = [int(i) for i in input().split()]

ans = 0
for i in range(len(a)):
    aa = a[:i] + a[(i+1):]
    if ans < gcds(aa):
        ans = gcds(aa)
print(ans)

Submission status: Runtime Error

Solution code:
import fractions 
from functools import reduce

n = int(input())
a = [int(i) for i in input().split()]

def gcd(nums):
    return reduce(fractions.gcd, nums)

ans = 0
for i in range(len(a)):
    aa = a[:i] + a[(i+1):]
    if ans < gcd(aa):
        ans = gcd(aa)
print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import fractions
import copy
from functools import reduce

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

N = int(input())
A = list(map(int, str(input()).split()))

gcds = list()
for i in range(0,N):
    B = copy.deepcopy(A)
    B.pop(i)
    tmp = gcd_list(B)
    gcds.append(tmp)

print(max(gcds))

Submission status: Runtime Error

Solution code:
A = int(input("input A:"))
B = int(input("input B:"))
T = int(input("input T:"))

x = T // A
result = x * B

print(result)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
T = int(input())

x = T // A

result = x * B
print(result)

Submission status: Runtime Error

Solution code:
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cctype>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <numeric>
#include <functional>
#include <cstdlib>
#include <regex>
#include <list>
int main() {
	int A, B, T;
	std::cin >> A >> B >> T;
	std::cout << T / A * B << std::endl;
	

	return 0;
}

Submission status: Runtime Error

Solution code:
import aasddfdscf

prit(cksdkjf_)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
print(b*(t/a))

Submission status: Runtime Error

Solution code:
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

res = 0
for i in range(N):
    a = V[i] - C[i]
    if a > 0:
        res = res + a
    else:
        pass

print(res)

Submission status: Runtime Error

Solution code:
A, B, T =map(int,input().split())
print(t // A*B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest 125
# C - GCD on Blackboard

# N-1個の全パターンの最大公約数の最大値でOK

# 最大公約数を計算
# ユークリッドの互除法を用いる
# def gcd(x, y):
#     # 大きい方をaに
#     a, b = (x,y) if x>y else (y,x)
#     if a == b:
#         return a
#     else:
#         return gcd(a-b,b)

# 再帰で書くと数字が大きいときに最大深さを超えてしまう！
def gcd(x, y):
    while x != y:
        x, y = (x-y,y) if x>y else (y-x,x)
    return x
        

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[an[j] for j in range(n) if i != j] for i in range(n)]
    gcds = [calc(n-1, ary) for ary in bn]
    print(max(gcds))

Submission status: Runtime Error

Solution code:
# 最大公約数を計算
# ユークリッドの互除法を用いる
def gcd(x, y):
    # 大きい方をaに
    a, b = (x,y) if x>y else (y,x)
    if a == b:
        return a
    else:
        return gcd(a-b,b)

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[an[j] for j in range(n) if i != j] for i in range(n)]
    gcds = [calc(n-1, ary) for ary in bn]
    print(max(gcds))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest 125
# C - GCD on Blackboard

# N-1個の全パターンの最大公約数の最大値でOK

# 最大公約数を計算
# ユークリッドの互除法を用いる
def gcd(x, y):
    # 大きい方をaに
    a, b = (x,y) if x>y else (y,x)
    if a == b:
        return a
    else:
        return gcd(a-b,b)

# N個の整数に対する最大公約数の計算
def calc(n, an):
    if n == 2:
        return gcd(an[0], an[1])
    else:
        return gcd(an[0], calc(n-1, an[1:]))


n = int(input())
an = [int(x) for x in input().split(' ')]

if n == 2:
    print(max(an))
else:
    #N-1個の組み合わせに対する最大公約数で最大のものを選ぶ
    # N-1個の組み合わせ
    bn = [[j for j in an if i != j] for i in an]
    if len(bn) == 0:
        print(an[0])
    else:
        gcds = [calc(n-1, ary) for ary in bn]
        print(max(gcds))

Submission status: Runtime Error

Solution code:
import numpy as np

N = int( input() )
A = np.array(list( map( int, input().split() ) ))

"""
任意の2組みの数字の符号を変えることができる
したがって負の数が偶数個の場合全てを正にして総和をとれば良い
負の数が奇数個の場合絶対値の最小のもののみ負にして総和をとればよい
0が存在する場合はすべて正にできる
"""

A_abs = np.abs(A)

if 0 in A:
    print(np.sum(A_abs))

else:
    num = 0
    for i in range(N):
        if A[i] < 0:
            num += 1

    if num % 2 == 0:
        print(np.sum(A_abs))
    else:
        print(np.sum(A_abs) - 2 * min(A_abs))

Submission status: Runtime Error

Solution code:
#include <stdio.h>

int main()
{
  int A,B,T;
  scanf("%d %d %d",&A,&B,&T);
  int cookies = 0;
  for(int i=1;i<=T;i++)
  {
    if(i % A == 0)
    {
      cookies += B;
    }
  }
  printf("%d\n",cookies);
}

Submission status: Runtime Error

Solution code:
import sys,os

f = open('a.txt', 'r')
sys.stdin = f

li = list(input().split())

A=int(li[0])
B=int(li[1])
T=int(li[2])

print(B*(T/A))

Submission status: Runtime Error

Solution code:
A,B,T = map(int,input().split())
a =T//A
number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)

Submission status: Runtime Error

Solution code:
A,B,T=map(int,input().split())
a =T//A
 number = 0
 for i in range(a):
  b=1
  s = a-b
  if s >0:
    number+=1
  b+=1
print(number*B)