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=(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=(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=(int,input().split())
int 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=(int,input().split())
int a =T//A
for i in range(a):
 int b=1
 int s = a-b
 if sum >0:
   number++
 b++
print(number*B)

Submission status: Runtime Error

Solution code:
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):

    xright.append(math.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(n):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(result)

Submission status: Runtime Error

Solution code:
data = input()
[A, B, T] = data.split(" ")
biscuits = 0
time = 0
while time < int(T) + 0.5:
  biscuits = biscuits + int(B)
  time = time + int(A)
print biscuits

Submission status: Runtime Error

Solution code:
a = input()
b = input()
t = input()

print(int((t+0.5)/a)*b)

Submission status: Runtime Error

Solution code:
from math import gcd
import copy 

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

if __name__ == '__main__':
	N=int(input())
	A=list(map(int,input().split()))

	ans=0
	for i in range(N):
		l=copy.deepcopy(A)
		l.pop(int(i))
		if(N>2):
			tmp_gcd=math.gcd(l[0],l[1])
			for j in range(2,len(l)):
				tmp_gcd=gcd(l[j],tmp_gcd)
			if(tmp_gcd > ans):
				ans=tmp_gcd
		else:
			ans=gcd(A[0],A[1])
	print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
v = [int(i) for i in input.split()]
c = [int(i) for i in input.split()]
print(sum([v[i]-c[i] if v[i]-c[i] > 0 for i in range(n)]))

Submission status: Runtime Error

Solution code:
input()
A = list(set(map(int, input().split()))
N = len(A)

def gcd(x, y):
  while y != 0:
    x, y = y, x%y
  return x


if N <= 2:
  print(max(A))
else:
  max = 0
  for i in range(N):
    temp = A.pop(0)
    ans = gcd(A[0], A[1])
    for j in A[1:]:
      ans = gcd(ans, j)
    if max < ans:
      max = ans
    A.append(temp)
  print(max)

Submission status: Runtime Error

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

def gcd(x, y):
  while y != 0:
    x, y = y, x%y
  return x


if N <= 2:
  print(max(A))
else:
  max = 0
  for i in range(N):
    temp = A.pop(0)
    ans = gcd(A[0], A[1])
    for j in A[1:]:
      ans = gcd(ans, j)
    if max < ans:
      max = ans
    A.append(temp)
  print(max)

Submission status: Runtime Error

Solution code:
#coding:utf-8
a,b,t = input().split()
x = t // a
print(b*x)

Submission status: Runtime Error

Solution code:
x,y,z= input().split()

A =( z + 0.5) / x

print( A * y)

Submission status: Runtime Error

Solution code:
X = list(int,input().split())

Y =( X[3] + 0.5) / X[1]

print( Y * X[2])

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
ma = []
pa = []
l =[]
t = 0
for i in a:
  if i < 0:
    ma.append(i)
    l.append(i*-1)
  elif i> 0:
    pa.append(i)
    l.append(i)
  else:
    t = 1
pa.sort()
ma.sort()
s = sum(l)
for i in [pa,ma]:
  if len(i)==0:i.append(0)
print(s  if t == 1 or len(b)%2==0 else s - 2*min(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce
import sys
n = int(sys.stdin.readline())
a = list(map(int,sys.stdin.readline().split()))
a2 = a.copy()
res = []
for i in range(0,n):
    a2.pop(i)
    res.append(reduce(fractions.gcd,a2))
    a2 = a.copy()
print(max(res))

Submission status: Runtime Error

Solution code:
import fractions
import copy
from functools import reduce
import sys
def gcd_list(numbers):
    return reduce(fractions.gcd,numbers)
  
n = int(sys.stdin.readline())
a = list(map(int,sys.stdin.readline().split()))
a2 = copy.deepcopy(a)
res = []
for i in range(0,n):
    a2.pop(i)
    res.append(gcd_list(a2))
    a2 = copy.deepcopy(a)
print(max(res))

Submission status: Runtime Error

Solution code:
import numpy as np


if __name__ == '__main__':
  N = int(input())
  A = list(map(int, input().split()))

  num_of_minus = sum([a < 0 for a in A])
  abs_A = [abs(a) for a in A]
  ans = sum(abs_A)

  if (num_of_minus % 2 == 0) or (sum([a == 0 for a in A])>0):
      print(ans)
  else:
      print(ans - 2 * min(abs_A))

Submission status: Runtime Error

Solution code:
import fractions
import copy
from functools import reduce
 
def gcd_list(numbers):
    return reduce(fractions.gcd,numbers)
  
n = int(input())
a = list(map(int,input().split()))
a2 = copy.deepcopy(a)
res = []
for i in range(0,n):
    a2.pop(i)
    res.append(gcd_list(a2))
    a2 = copy.deepcopy(a)
print(max(res))

Submission status: Runtime Error

Solution code:
import fractions
import copy

def gcd_list(numbers):
    ans = numbers[0]
    for i in range(1,n-1):
        ans = fractions.gcd(ans,numbers[i])
    return ans
  
n = int(input())
a = list(map(int,input().split()))
a2 = copy.deepcopy(a)
res = []
for i in range(0,n):
    a2.pop(i)
    res.append(gcd_list(a2))
    a2 = copy.deepcopy(a)
print(max(res))

Submission status: Runtime Error

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

n = int(input())
a = list(map(int,input().split()))
res = []
for i in range(0,n):
    for j in range(0,n):
        if i != j:
            res.append(gcd(a[i],a[j]))
print(max(res))

Submission status: Runtime Error

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


n = int(input())
a = map(int,input().split())
a = list(map(int, a))
a1 = a
res = 0
count = 0
count1 = 0
for i in a:
    for j in a1:
        if count != count1 and gcd(i,j)>res:
            res = gcd(i,j)
        count1 = count1 + 1
    count = count + 1
    count1 = 0
print(res)

Submission status: Runtime Error

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

print(T/A * B)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main()
{
    int a,b,t;

    cin >> a >> b >> t;

    cout << t/a*b;

    return 0;
}

Submission status: Runtime Error

Solution code:
def main():
    a, b, t = get_next_ints()
    
    n = t // a
    print(n * b)
    
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

# coding: utf-8

# In[28]:

import sys
#input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))


# In[21]:

#import numpy as np
#A.sort(key=lambda x:abs(x))
#print(N, A)


# In[25]:

#A = np.array(A)
#print(sum(A<0))
#if sum(A<0)%2 == 0:
#    print(sum(abs(A)))
#else:
#    print(sum(abs(A[1:])) - abs(A[0]))


# In[29]:

B = list(map(abs, A))
C = [a for a in A if a < 0]
#print(A)
#print(B)
#print(C)


# In[30]:

if len(C)%2 ==0:
    print(sum(B))
else:
    print(sum(B) - min(B)*2)


# In[ ]:

Submission status: Runtime Error

Solution code:
a, b, t = map(int, list(input()))
total = 0
for i in range(a, t+1, a):
  total += b
print(total)

Submission status: Runtime Error

Solution code:
a, b, t = list(input(''))
total = 0
for i in range(a, t+1, a):
  total += b
print(total)

Submission status: Runtime Error

Solution code:

# coding: utf-8

# In[1]:

import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))


# In[2]:

#import copy
#import numpy as np
try:
    from fractions import gcd
except:
    from math import gcd


# In[ ]:

# 左からn個の最大公約数を求める O(n)
# 右からn個の最大公約数を求める O(n)
# n個目を抜いた最大公約数は n-1個目までの公約数とn+1個目からの公約数との公約数


# In[3]:

lg = [1]*(N)
rg = [1]*(N)
ans = 0


# In[4]:

#print(lg)
#print(rg)
#print(A)


# In[ ]:

lg[0] = A[1]
rg[0] = A[N-2]
lg[1] = A[0]
rg[1] = A[N-1]
#print(lg, rg)
for i in range(1, N-1):
    #print(i)
    lg[i+1] = gcd(lg[i], A[i])
    #print(lg[i], A[i])
    rg[i+1] = gcd(rg[i], A[N-1-i])
    #print(rg[N-1-i], A[N-1-i])
#print(lg, rg)

ans = [0]*N
ans = [gcd(lg[i], rg[N-1-i]) for i in range(N)]
#for i in range(N):
    #print(i, lg[i], rg[N-i-1])
    #ans = gcd(lg[i], rg[N-i-1])
print(max(ans))


# In[6]:

#print(ans)

Submission status: Runtime Error

Solution code:
def resale(V, C):

    result = 0
    for v, c in zip(V, C):
        if v > c:
            result += v - c
            
    return result


if __name__ == '__main__':
    
#    print('Input: ')
    n = int(input())
    v = list(map(int, input().split()))
    c = list(map(int, input().split()))
    
#    print('---------------------')
#    print('Output: ')
    print(resale(v,c))
    
    
    
#    a = list(map(int, input().split()))
#    N = a[0]
#    b = (len(a)-1)/2+1
#    V = a[1:b]
#    C = a[b:]    
#    print(calc(V, C))

Submission status: Runtime Error

Solution code:
import math
import functools
import fractions
from functools import reduce
import itertools

gcd1 = 0
gcd2 = 0
ans = 0

N = int(input())
values = ([int(x) for x in input().split()])
for i in list(itertools.combinations(values,2)):
  gcd1 = functools.reduce(fractions.gcd,i)
  if gcd1>gcd2:
    gcd2 = gcd1
    ans = gcd1
    
print(ans)

Submission status: Runtime Error

Solution code:
def add(A,B,T):
  C=T//A
  return C*B
  
A=int(input())
B=int(input())
T=int(input())
print(add(A,B,T))

Submission status: Runtime Error

Solution code:
n = input()
v_list = [int(x) for x in input().split()]
c_list = [int(x) for x in input().split()]
total_profit = 0
for v, c in zip(v_list, c_list)
    profit = v -c
    if profit > 0:
        total_profit += profit
print(total_profit)

Submission status: Runtime Error

Solution code:
N = int(input())
V = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
diff = [v-c if (v-c > 0) else 0 for v, c in zip(V, C)]
print(sum(diff))

Submission status: Runtime Error

Solution code:

# coding: utf-8

# In[1]:

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


# In[2]:

import copy
import numpy as np


# In[3]:

try:
    from math import gcd as ogcd
except:
    from fractions import gcd as ogcd
from functools import reduce

def gcd(*numbers):
    return reduce(ogcd, numbers)


# In[4]:

gcd_list = []
for i in range(N):
    Ac = copy.copy(A)
    Ac.pop(i)
    #print(Ac)
    gcd_list.append(gcd(*Ac))


# In[5]:

print(np.max(np.array(gcd_list)))


# In[ ]:

Submission status: Runtime Error

Solution code:

# coding: utf-8

# In[ ]:

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


# In[ ]:

import numpy as np


# In[ ]:

V = np.array(V)
C = np.array(C)


# In[ ]:

bene = V-C
print(np.sum(bene[bene>0]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, t = input().split()

createNum = a * (t / b)

print(createNum)

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

n=int(input())
al=input().split()
al_i = [int(s) for s in al]

if (n == 2):
   print(gcd(al_i[0],al_i[1]))
   return

fg = [0] * n
bg = [0] * n

for x in range(n):
   if (x == 0):
       fg[0] = al_i[0]
       y = 1
   else:
      while y <= x:
         fg[y] = gcd(fg[y-1], al_i[y])
         y += 1

for x in range(n):
   if (x == 0):
      bg[0] = al_i[n-1]
      y = 1
   else:
      while y <= x:
         bg[y] = gcd(bg[y-1], al_i[n-1-y])
         y += 1

m = 0
gm = 0

for x in range(n):
   if (x == 0):
      g = bg[n-2]
   elif (x == n):
      g = fg[n-2]
   else:
      g = gcd(fg[x-1],bg[n-2-x])
   if (g > gm):
      gm = g

print(gm)

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce

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

n=int(input())
al=input().split()
al_i = [int(s) for s in al]
m = max(al_i)
gm = 0

for x in range(n):
   t = al_i[x]
   al_i[x] = m
   g = gcd(*al_i)
   al_i[x] = t
   if g>gm:
      gm = g
print(gm)

Submission status: Runtime Error

Solution code:
_ = input()
L = list(map(int, input().split()))
L_set = list(set(L))
L_set.sort()


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    # print(divisors[::-1])
    return divisors[::-1]


def search(yakusu_list):
    for yakusu in yakusu_list:
        cnt = 0
        for l in L:
            if l % yakusu != 0:
                cnt += 1
        if cnt == 1 or cnt == 0:
            print(yakusu)
            return True
        else:
            pass
    return False


if not search(make_divisors(L_set[0])[:-1]):
    if not search(make_divisors(L_set[1])):
        print(1)

Submission status: Runtime Error

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

x = int(T)// int(A) * int(B)

print(round(x))

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
ggcd=0

def gcd(x,y):
    if x<y:
        x,y=y,x
    if x%y==0:
        return y
    else:
        return gcd(y,x%y)

for i in range(n):
    b=list(a)
    del b[i]
    gc=b[0]
    for j in range(n-1):
        gc=gcd(gc,b[j])
    ggcd=max(gc,ggcd)

print(ggcd)

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input())
print((t//a)＊b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
loop, kosu, time = map(int, input().split(" "))
print(kosu * (time//loop)

Submission status: Runtime Error

Solution code:
from fractions import gcd
 
n,*a = map(int, open(0).read().split())
 
rs, ls = [0], [0]
for i in range(n-1):
  rs.append(gcd(rs[i], a[i]))
  ls.append(gcd(ls[i], a[-i-1]))
 
print(max(gcd(r, l) for r, l in zip(rs, ls[::-1])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def calc_max_total_jewels_value():
  jewels = int(input())
  jewel_value = [int(x) for x in input().split()]
  jewel_cost = [int(x) for x in input().split()]
  
  max_total_jewels_value = 0
  for jewel_no in range(jewels):
    max_total_jewels_value += max([0, jewel_value[jewel_no] - jewel_cost[jewel_no]])
    
  return max_total_jewels_value

if __name__ == '__main__':
  print(calc_max_total_jewels_value())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input().split())
i=1
while i*a<t+0.5:
  i++
print((i-1)*b)

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input().split())
i=1
while i*a<t+0.5:
  i++
print{(i-1)*b}

Submission status: Runtime Error

Solution code:

(A, B, T) = (int, input().split())

biscuit = 0

for i in range(0, A*10, T*10 + 5):
    biscuit += B

print(B)

Submission status: Runtime Error

Solution code:
n = int(input())
A = [int(i) for i in input().split()]
A.insert(0, 0)
dp = list([0] * 2 for i in range(n+1))
dp[0][0] = 0
dp[0][1] = -1000000000000
for i in range(1, n) :
    dp[i][0] = max(dp[i-1][0] + A[i], dp[i-1][1] - A[i])
    dp[i][1] = max(dp[i-1][0] - A[i], dp[i-1][1] + A[i])
ans = max(dp[n-1][0] + A[n], dp[n-1][1] - A[n])    

print(ans)

Submission status: Runtime Error

Solution code:
a, b, t = map(int, input().split(' '))
return (t+0.5)//a*b

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import scikits-learn
a,b,t = map(int, input().split())
print(1)

Submission status: Runtime Error

Solution code:
from fractions import gcd
from itertools import combinations
from functools import reduce


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


def main(input_1, input_2):
    nums_list = list(map(list, list(combinations(input_2, len(input_2)-1))))

    gcd_list = []
    for nums in nums_list:
        calced = calc_gcd(nums)
        gcd_list.append(calced)

    return max(gcd_list)


if __name__ == "__main__":
    input_1 = input()
    input_2 = list(map(int, input().split()))
    print(main(input_1, input_2))

Submission status: Runtime Error

Solution code:
from fractions import gcd

n = int(input())
a = list(map(int, input().split()))

rs, ls = [0], [0]
for i in range(n-1):
  rs.append(gcd(rs[i], a[i]))
  ls.append(gcd(ls[i], a[-i-1]))

print(max(gcd(r, l) for r, l in zip(rs, ls[::-1])))

Submission status: Runtime Error

Solution code:
from fractions import gcd
from functools import reduce

n=int(input());Alist=list(map(int,input().split()))

def gcd_L(numbers):
    return reduce(gcd, numbers)

M_list = []
for i in range(n):
    alist = Alist[:i] + Alist[i+1:]
    M_list.append(gcd_L(alist))

print(max(M_list))

Submission status: Runtime Error

Solution code:
from math import gcd
from functools import reduce

n=int(input());Alist=list(map(int,input().split()))

def gcd_L(numbers):
    return reduce(gcd, numbers)

M_list = []
for i in range(n):
    alist = Alist[:i] + Alist[i+1:]
    M_list.append(gcd_L(alist))

print(max(M_list))

Submission status: Runtime Error

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

N = T % B
product = N * B

print(product)

Submission status: Runtime Error

Solution code:
a, b, t = (int(i) for i in input().split()) 

return ((t + 0.5) // a) * b

Submission status: Runtime Error

Solution code:
from fractions import gcd
import math
N = int(input())
A = list(map(int,input().split()))
L_A = [0]*(N+1)
R_A = [0]*(N+1)
for i in range(N):
    L_A[1+i] = math.gcd(L_A[i], A[i])
for i in reversed(range(N)):
    R_A[i] = math.gcd(R_A[i+1], A[i])
print(max(math.gcd(L_A[i], R_A[i+1]) for i in range(N)))

Submission status: Runtime Error

Solution code:
import sys

A = int(input())
B = int(input())
T = int(input())

sum = ((T+0.5)/A) * B

Submission status: Runtime Error

Solution code:
n = int(input())
list_v = map(int,input().split())
list_c = map(int,input().split())
 
ans = 0
for i in range(n):
  if list_v[i] - list_c[i] > 0:
    ans += list_v[i] - list_c[i]
print(int(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
C = list(map(int, input().split()))
V = list(map(int, input().split()))
sum = 0
for i in range(N):
    sum += max(0, V[i]-C[i])
print(sum)

Submission status: Runtime Error

Solution code:
a=int(input())
p=list(map(int,input().split())
q=list(map(int,input().split())
cost=0
for i in range(a):
    if p[i]-q[i] > 0:
        cost += (p[i]-q[i])
print(cost)

Submission status: Runtime Error

Solution code:
n,m=[int(i) for i in input().split()]
id=[[int(i) for i in input().split()]+[j] for j in range(m)]

print(id)

pre_num=[0]*(n+1)
ans=[""]*m

id.sort(key=lambda x:x[1])

for p,y,i in id:
    pre_num[p]+=1
    ans[i]=str(p).zfill(6)+str(pre_num[p]).zfill(6)
    
print("\n".join(ans))

Submission status: Runtime Error

Solution code:
inputs = list(map(int, inpit().split()))

A = input[0]
B = input[1]
T = input[2]

Q = int(T / A)
print(Q)
X = Q* B
print(X)

Submission status: Runtime Error

Solution code:
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬     ╬╬╬╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬          ╬   ╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬     ╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╬ ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬     ╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬    ╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╬      ╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╬   ╬╬╬╬╬╬╬  ╬      ╬╬╬╬  ╬╬╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬ ╬╬ ╬    ╬╬╬╬╬╬╬╬╬        ╬ ╬        ╬╬ ╬╬╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╬     ╬╬╬           ╬ ╬╬╬    ╬  ╬╬  ╬╬╬╬╬╬╬╬
# ╬╬╬╬╬╬ ╬╬╬╬╬╬╬╬                        ╬╬╬╬╬╬╬╬╬  ╬   ╬╬╬╬╬╬╬╬   ╬╬╬
# ╬╬  ╬╬╬  ╬╬╬╬     ╬╬╬╬╬                  ╬╬╬╬╬╬╬       ╬╬ ╬╬╬╬  ╬    ╬
# ╬╬      ╬   ╬╬╬╬╬╬╬╬╬╬╬ ╬                 ╬╬╬╬         ╬  ╬╬╬           ╬
# ╬╬       ╬╬╬╬╬    ╬                                  ╬    ╬╬               ╬
# ╬╬     ╬╬╬╬╬╬╬╬                                    ╬╬    ╬
# ╬╬     ╬╬╬╬╬╬╬╬╬╬╬╬╬╬                      ╬          ╬
# ╬╬╬╬  ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬                                      ╬
# ╬╬╬╬╬       ╬╬╬╬╬                                          ╬
# ╬╬╬╬╬╬╬                                    ╬╬╬
# ╬╬╬╬╬╬╬╬╬╬                          ╬  ╬╬╬╬╬╬╬╬
# ╬╬╬╬╬╬╬╬╬ ╬  ╬                  ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬         ╬
# ╬╬╬╬╬╬╬╬╬╬╬╬                  ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬        ╬
# ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬                ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬       ╬
# ╬    ╬╬╬╬╬╬╬╬╬╬╬                 ╬╬╬╬╬╬╬╬╬╬

n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
    if v[i] - c[i] > 0:
        ans += v[i] - c[i]

print(ans)

Submission status: Runtime Error

Solution code:
a,b,t = map(int, input().split())
ans = ((T+0.5) // a)*b
print(int(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(T//A*B)

Submission status: Runtime Error

Solution code:
from functools import reduce
from fractions import gcd

N = int(input())
A = [int(a) for a in input().split(" ")]
if N==2:
    print(gcd(*A))
else:
    left = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A, A[:1])
    right = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A[::-1], A[-1:])[::-1]

    ans = max([gcd(left[i-1], right[i+1]) for i in range(1,N-1)])
    ans = max([right[1], ans, left[-2]])
    print(ans)

Submission status: Runtime Error

Solution code:
from functools import reduce
from math import gcd

N = int(input())
A = [int(a) for a in input().split(" ")]
if N==2:
    print(gcd(*A))
else:
    left = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A, A[:1])
    right = reduce(lambda acc, x: acc+[gcd(x, acc[-1])], A[::-1], A[-1:])[::-1]

    ans = max([gcd(left[i-1], right[i+1]) for i in range(1,N-1)])
    ans = max([right[1], ans, left[-2]])
    print(ans)

Submission status: Runtime Error

Solution code:
import math

N = int(input())
inp_ints = list(map(int, input().split()))
# ints = list(set(inp_ints))

uniq_ints = list(set(inp_ints))
ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m)

gcd = 0
result = 1
for i in range(len(ints)):
    gcd = 0
    for m in ints[:i]:
        gcd = math.gcd(gcd, m)
    for m in ints[i+1:]:
        gcd = math.gcd(gcd, m)
    if gcd > result:
        result = gcd

print(result)

Submission status: Runtime Error

Solution code:
import fractions

N = int(input())
inp_ints = list(map(int, input().split()))
ints = list(set(inp_ints))
""" uniq_ints = list(set(inp_ints))

ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m) """

gcd = 0
result = 1
for i in range(len(ints)):
    gcd = 0
    for m in ints[:i]:
        gcd = fractions.gcd(gcd, m)
    for m in ints[i+1:]:
        gcd = fractions.gcd(gcd, m)
    if gcd > result:
        result = gcd

print(result)

Submission status: Runtime Error

Solution code:
import fractions

N = int(input())
inp_ints = list(map(int, input().split()))
ints = list(set(inp_ints))
""" uniq_ints = list(set(inp_ints))

ints = uniq_ints
for m in uniq_ints:
    if inp_ints.count(m) >= 2:
        ints.append(m) """

gcd = 0
result = 1
holed_ints = []
for i in range(len(ints)):
    holed_ints = ints[:i] + ints[i+1:]
    gcd = 0
    for j in range(len(ints)-1):
        gcd = fractions.gcd(gcd, holed_ints[j])
    if gcd > result:
        result = gcd

print(result)

Submission status: Runtime Error

Solution code:
#!/bin/env python
  

if __name__=='__main__':
  val_n = input()
  list_v = list(map(int,input().split()))
  list_c = list(map(int,input().split()))

  answer = 0
  for i in range(len(list_v)):
    if(list_v[i] - list_c[i] > 0):
      answer += list_v[i] - list_c[i]
  print(answer)

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-#
# https://atcoder.jp/contests/abc125/tasks/abc125_a

import math

s1 = input()
s2 = input()
s3 = input()

time = int(s3) +  0.5
bsk = math.floor(time / int(s1))

ans = bsk * int(s2)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
vector_list = ([int(x) for x in input().split()])
cost_list = ([int(x) for x in input().split()])
ans = 0
for i in range(len(vector_list)):
  if vector_list[i]-cost_list[i]>0:
    ans += vector_list[i]-cost_list[i]

print(ans)

Submission status: Runtime Error

Solution code:
# _*_ coding: utf-8 _*_
 
N = int(input())
vs = [int(e) for e in input().strip().split()]
cs = [int(e) for e in input().strip().split()]
 
profit = 0
for i in range(N):
    if vs[i] > cs[i]:
        profit += (vs[i] - cs[i])
 
print(profit)

Submission status: Runtime Error

Solution code:
N = int(input())
vector_list = ([int(x) for x in input().split()])
cost_list = ([int(x) for x in input().split()])
ans = 0
for i in range(N):
  if vector_list[i]-cost_list[i]>0:
    ans += vector_list[i]-cost_list[i]

print(ans)

Submission status: Runtime Error

Solution code:

  a,b,t = map(int, input.split(" "))
  
  total=0
  
  for i in range(1,20):
    if a*i > t:
      break
    else:
      total += b
  
  print(total)

Submission status: Runtime Error

Solution code:
N = int(input())
vector_list = ([int(x) for x in input().split()])
cost_list = ([int(x) for x in input().split()])
ans = 0
for i in range(N):
  if vector_list[i]-cost_list[i]>0:
    ans += vector_list[i]-cost_list[i]

print(ans)

Submission status: Runtime Error

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

N = int(input().rstrip())
As = list(map(int, input().rstrip().split()))


def gcd_list(numbers):
    res = fractions.gcd(numbers[0], numbers[1])
    if len(numbers) > 2:
        for idx in range(2, len(numbers)):
            res = fractions.gcd(res, numbers[idx])
    return res


max_gcd = 0
if(N) == 2:
    max_gcd = max(As)
else:
    for i in range(N):
        others = [As[j] for j in range(N) if j != i]
        max_gcd = max(gcd_list(others), max_gcd)

print(max_gcd)

Submission status: Runtime Error

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

N = int(input().rstrip())
As = list(map(int, input().rstrip().split()))


def gcd_list(numbers):
    res = math.gcd(numbers[0], numbers[1])
    if len(numbers) > 2:
        for idx in range(2, len(numbers)):
            res = fractions.gcd(res, numbers[idx])
    return res


max_gcd = 0
if(N) == 2:
    max_gcd = max(As)
else:
    for i in range(N):
        others = [As[j] for j in range(N) if j != i]
        max_gcd = max(gcd_list(others), max_gcd)

print(max_gcd)

Submission status: Runtime Error

Solution code:
genarated_time=T/A
count=genarated_time*B

Submission status: Runtime Error

Solution code:
from fractions import *
n = int(input())
a = [0]+list(map(int, input().split()))+[0]
b = [0]*(n+2)
c = [0]*(n+2)
for i in range(1, n+1):
	b[i] = gcd(b[i-1], a[i])
for i in range(n, 0, -1):
	c[i] = gcd(c[i+1], a[i])
print(max(gcd(b[i-1], c[i+1]) for i in range(1, n+1)))
#sample answer.

Submission status: Runtime Error

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

minv = -1
count = 0
s = 0
for i in range(n):
    if a[i] < 0:
        s += -a[i]
        if minv > -a[i] or minv == -1:
            minv = -a[i]
        count += 1
    else:
        s += a[i]
        if minv > a[i] or minv == -1:
            minv = a[i]

print(s)
if count % 2 == 1:
    s += 2*(-minv)

print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
a = map(int, input().split())
*a_abs, = map(abs, a)
if len([i for i in a if i<0])%2 ==0:
    print(sum(a_abs))
else:
    print(sum(a_abs)-2*min(a_abs))

Submission status: Runtime Error

Solution code:
# 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])]))

Submission status: Runtime Error

Solution code:
# 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]))