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:
def gcdf(a):
    a.sort()
#    print("a2:",a)
    a0=a[0]
    a=[int(x%a0) for x in a if x%a0 != 0]
#    print("a2:",a)
    if len(a)==0:
        return a0
    else:
        a.append(a0)
        a0=min(a)
        return gcdf(a) 

#n=8
#a=[746130, 1385670, 4849845, 881790, 3233230, 1939938, 570570, 510510]
#ans=[19]
#n=2
#a=[1000000000, 1000000000]
#n=5
#a=[15, 18, 24, 36, 81]
#n=3
#a=[7, 6, 8]
n=int(input())
a=[]
for i in map(int,input().split()):
    a.append(i)
if n==2:
    print(max(a))
elif n<2**10:
    gcdv=0
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)
else:
    m=int(n**(1/2))
    ns=int(n/m)
    rgcd=[]
    for mi in range(m):
        ms=ns*mi
        if mi==m-1:
            am=a[ms:n]
        else:
            am=a[ms:ms+ns]
        gcdm=gcdf(am)
        rgcd.append(gcdm)
    gcdv=0

    for mi in range(m):
        rgcd1=list(rgcd)
        del rgcd1[mi]
        gcdrg1=gcdf(rgcd1)
        ms=ns*mi
        if mi==m-1:
            am=a[ms:n]
        else:
            am=a[ms:ms+ns]
#        print(mi,gcdf(am),len(am),gcdf(rgcd1))
        for i in range(len(am)):
            acpy=list(am)
#            del acpy[i]
#            acpy.append(gcdrg1)
            acpy[i]=gcdrg1
            gcdx=gcdf(acpy)
            if gcdx>gcdv:
                gcdv=gcdx
    print(gcdv)

Submission status: Runtime Error

Solution code:
def gcdf(a):
    a.sort()
    a0=a[0]
    a=[int(x%a0) for x in a if x%a0 != 0]
#    print("a2:",a)
    if len(a)==0:
        return a0
    else:
        a.append(a0)
        a0=min(a)
        return gcdf(a) 

#n=8
#a=[746130, 1385670, 4849845, 881790, 3233230, 1939938, 570570, 510510]
#ans=[19]
#n=2
#a=[1000000000, 1000000000]
#n=5
#a=[15, 18, 24, 36, 81]
#n=3
#a=[7, 6, 8]
n=int(input())
a=[]
for i in map(int,input().split()):
    a.append(i)

#print(a)
if n==2:
    print(max(a))
elif n<2**12:
    gcdv=0
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)
else:
    m=2**10
    ns=int(n/m)
    rgcd=[]
    for mi in range(m):
        ms=ns*mi
        if mi==n-1:
            am=a[ms:n]
        else:
            am=a[ms:ms+ns]
        gcdm=gcdf(am)
        rgcd.append(gcdm)

    gcdv=0

    for mi in range(m):
        rgcd1=rgcd.copy()
        del rgcd1[mi]
        ms=ns*mi
        if mi==n-1:
            am=a[ms:n]
        else:
            am=a[ms:ms+ns]
        for i in range(len(am)):
            acpy=am.copy()
            del acpy[i]
            acpy=acpy+rgcd1
            gcdx=gcdf(acpy)
            if gcdx>gcdv:
                gcdv=gcdx

#    print(gcdv,a1)
    print(gcdv)

Submission status: Runtime Error

Solution code:
def gcdf(a,n,gcdv):
#    print("a:",a)
    a0=a[0]
    ramin=10**9
    ramin0=20**9
    while ramin0!=ramin:
        ramin0=ramin
        for i in range(n):
            a[i]=a[i]%a0
            if a[i]==0:
                a[i]=a0
            if ramin>a[i]:
                ramin=a[i]
            if ramin<=gcdv:
                return gcdv
        a0=min(a)
#        print("a:",a,ramin)
    return ramin


#n=2
#a=[1000000000, 1000000000]
#n=4
#a=[15, 18, 24, 36]
n=int(input())

a=[]
for i in map(int,input().split()):
    a.append(i)

#print(a)
if n==2:
    print(max(a))
elif n>=16:
    a.sort()
    ns=int(n/4)
    a1=a[0:ns]
    a2=a[ns:ns*2]
    a3=a[ns*2:ns*3]
    a4=a[ns*3:n]
#    print(a1)
#    print(a2)
#    print(a3)
#    print(a4)
    gcdv=0
    gcd1=gcdf(a1,len(a1),gcdv)
    gcd2=gcdf(a2,len(a2),gcdv)
    gcd3=gcdf(a3,len(a3),gcdv)
    gcd4=gcdf(a4,len(a4),gcdv)
    for i in range(ns):
#        acpy=list(a1)
        acpy=a1.copy()
        acpy.append(gcd2)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a1)
    for i in range(ns):
#        acpy=list(a2)
        acpy=a2.copy()
        acpy.append(gcd1)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a2)
    for i in range(ns):
#        acpy=list(a3)
        acpy=a3.copy()
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd4)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a3)
    for i in range(ns):
#        acpy=list(a4)
        acpy=a4.copy()
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        del acpy[i]
#        print(i,acpy)
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
#    print(gcdv,a4)
    print(gcdv)
    
else:
    gcdv=0
    a.sort()
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy,n-1,gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)

Submission status: Runtime Error

Solution code:
def gcdf(a,n,gcdv):
#    print("a:",a)
    a0=a[0]
    ramin=10**9
    ramin0=20**9
    while ramin0!=ramin:
        ramin0=ramin
        for i in range(n):
            a[i]=a[i]%a0
            if a[i]==0:
                a[i]=a0
            if ramin>a[i]:
                ramin=a[i]
            if ramin<=gcdv:
                return gcdv
        a0=min(a)
#        print("a:",a,ramin)
    return ramin


#n=2
#a=[1000000000, 1000000000]
#n=4
#a=[15, 18, 24, 36]
n=int(input())

a=[]
for i in map(int,input().split()):
    a.append(i)

#print(a)
if n==2:
    print(max(a))
elif n>=16:
    a.sort()
    ns=int(n/4)
    a1=a[0:ns]
    a2=a[ns:ns*2]
    a3=a[ns*2:ns*3]
    a4=a[ns*3:n]
    gcdv=0
    gcd1=gcdf(a1,len(a1),gcdv)
    gcd2=gcdf(a2,len(a2),gcdv)
    gcd3=gcdf(a3,len(a3),gcdv)
    gcd4=gcdf(a4,len(a4),gcdv)
    for i in range(ns):
        acpy=list(a1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a2)
        acpy.append(gcd1)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a3)
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a4)
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)
    
else:
    gcdv=0
    a.sort()
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy,n-1,gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)

Submission status: Runtime Error

Solution code:
def gcdf(a,n,gcdv):
#    print("a:",a)
    a0=a[0]
    ramin=10**9
    ramin0=20**9
    while ramin0!=ramin:
        ramin0=ramin
        for i in range(n):
            a[i]=a[i]%a0
            if a[i]==0:
                a[i]=a0
            if ramin>a[i]:
                ramin=a[i]
            if ramin<=gcdv:
                return gcdv
        a0=min(a)
#        print("a:",a,ramin)
    return ramin


#n=2
#a=[1000000000, 1000000000]
#n=4
#a=[15, 18, 24, 36]
n=int(input())

a=[]
for i in map(int,input().split()):
    a.append(i)

#print(a)
if n==2:
    print(max(a))
elif n<-16:
    a.sort()
    ns=int(n/4)
    a1=a[0:ns]
    a2=a[ns:ns*2]
    a3=a[ns*2:ns*3]
    a4=a[ns*3:n]
    gcdv=0
    gcd1=gcdf(a1,len(a1),gcdv)
    gcd2=gcdf(a2,len(a2),gcdv)
    gcd3=gcdf(a3,len(a3),gcdv)
    gcd4=gcdf(a4,len(a4),gcdv)
    for i in range(ns):
        acpy=list(a1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a2)
        acpy.append(gcd1)
        acpy.append(gcd3)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a3)
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd4)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    for i in range(ns):
        acpy=list(a4)
        acpy.append(gcd1)
        acpy.append(gcd2)
        acpy.append(gcd3)
        del acpy[i]
        gcdx=gcdf(acpy,len(acpy),gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)
    
else:
    gcdv=0
    a.sort()
    for i in range(n):
        acpy=list(a)
        del acpy[i]
        gcdx=gcdf(acpy,n-1,gcdv)
        if gcdx>gcdv:
            gcdv=gcdx
    print(gcdv)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
max_gcd = 1
def gcd(a,b):
    if b == 0:
        return a
    else:
        return(gcd(b,a%b))

for i in range(n):
    if i == 0:
        b = a[1:n]
    elif i == n-1:
        b = a[:i]
    else:
        b = a[:i] + a[i+1:n]
#    print(b)
    for j in range(1,len(b)):
        b[j] = gcd(max(b[j],b[j-1]),min(b[j],b[j-1]))
    if len(b)>1:
        c = gcd(max(b[0],b[1]),min(b[0],b[1]))
    else:
        c = b[0]
    if max_gcd<c:
        max_gcd = c
print(max_gcd)

Submission status: Runtime Error

Solution code:
h = int(input())
w = int(input())
n = int(input())

if n / max(h, w) > n:
    print(n // max(h, w) + 1)
elif n / max(h, w) == 1:
    print(1)
elif n / max(h, w) < 1:
    print(1)
else:
    print(n // max(h, w))

Submission status: Runtime Error

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

ans = []
minus_num = 0

for num in a:
    if num < 0:
        ans.append( num * -1 )
        minus_num += 1
    else:
        ans.append( num )

if minus_num % 2 == 0:
    print(sum(ans))
else:
    ans.sort()
    print(sum(ans[1:]) + ans[0] * -1)

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:
#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 = map(int, input().split())
print((T//A)*B)20

Submission status: Runtime Error

Solution code:
N = input()
V_list = list(map(int,input().split()))
C_list = list(map(int,input().split())
 
diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:


from math import gcd
from functools import reduce # reduceの使い方覚える、ついでにaccumulateも

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

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

result = []
for i in range(n):
  numbers = A[:]
  numbers.pop(i)
  result.append(divider(numbers))
print(max(result))

Submission status: Runtime Error

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


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


n = int(input())
lst = list(map(int, input().split()))
min_v = min(lst)

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  # if min_v < max_gcd:
  #   break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Submission status: Runtime Error

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


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


n = int(input())
lst = list(map(int, input().split()))
min_v = min(lst)

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  if min_v < max_gcd:
    break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Submission status: Runtime Error

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


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


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

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  # if min(arr) < max_gcd:
  #   break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = False if mod > 0 else check(a, ret) if ret >= a else True
  return value


a, b, t, biscuit = map(int, input().split() + ["0"])
for i in range(1, t + 1):
  if check(a, i):
    biscuit = biscuit + b

print(biscuit)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  if mod > 0:
    return False
  if ret >= a:
    return check(a, ret)
  else:
    return True


a, b, t = map(int, input().split())
biscuit = 0
for i in range(1, ((t + 1) * 2)):
  time = i / 2
  if check(a, time):
    biscuit = biscuit + b
  if time == t + 0.5:
    break

print(biscuit)

Submission status: Runtime Error

Solution code:
import math

A = int(input())
B = int(input())
T = int(input())
 
sum = T // A * B 
ss = math.floor(sum)
print(ss)

Submission status: Runtime Error

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

print(sum)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
T = int(input())
 
sum = (T + int(0.5)) % A * B 

print(sum)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b,t,ans;
    cin >> a;
    cin >> b;
    cin >> t;
    
    ans = b * int((t + 0.5) / a);
    cout << ans << endl;
    
}

Submission status: Runtime Error

Solution code:
import copy
import fractions as f


n = int(input())
a = list(map(int, input().split()))
a = list(set(a))
b = copy.deepcopy(a)
ans = 1
min_a = min(a)

if (2 <= b.count(min_a):
    a.append(min_a)

for e in b:
    if (len(a) == 1):
        ans = a[0]
    elif (len(a) == 2):
        ans = max(a[0], a[1])
    else:
        a.remove(e)
        rep = a[0]

        for elem in a:
            rep = f.gcd(rep, elem)

        if (ans < rep):
            ans = rep

        a.append(e)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,t=map(int, input().split())
cnt=0
t+=0.5
for i in range(1,t,a):
    cnt+=b
print(cnt)

Submission status: Runtime Error

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

l=[]
l.append(0)
l.append(0)
r=[]
r.append(a[n-1])
r.append(a[n-1])
g=[]

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


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

for j in range(0,n):
  g.append(gcd(l[j+1],r[n-j-1]))

print(max(g))

Submission status: Runtime Error

Solution code:
import fractions as math
#import fractions as math
n = int(input())
list1 = list(map(int,input().split()))
a = math.gcd(list1[0],list1[-1])
b = 0
for i in range(0,n):
	if a > math.gcd(a,list1[i]):
		a = math.gcd(a,list1[i])
		b = list1.index(list1[i])
del list1[b]
a = list1[0]
for i in range(0,len(list1)):
	a = min(a,math.gcd(a,list1[i]))
print(a)

Submission status: Runtime Error

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

cnt = 0
for i in A:
    if i < 0: cnt += 1

A_abs = list(map(abs, A))
minmum = min(A_abs)

if cnt % 2 == 0:
    ans = sum(A_abs)
else:
    ans = sum(A_abs) - 2*minmum

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()]
n=0
for j in range(N):
   k=V[j]-C[j]
   if k>0:
      n+=k
print(n)

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()]
n=0
for j in range(N):
 k=V[j]-C[j]
 if k>0:
   n+=k
print(n)

Submission status: Runtime Error

Solution code:
a, b, t = [int(i) for i in input().split()]
print(b * (c // a))

Submission status: Runtime Error

Solution code:
import copy
import fractions

n = int(input())
l = list(map(int, input().split()))
sum = 0
if len(l) == 2:
    print(max(l[0], l[1]))
    exit()
else:
    for i in range(n):
        ll = copy.deepcopy(l)
        ll.pop(i)
        ans = ll[0]
        for j in range(1, len(ll)):
            ans = fractions.gcd(ans, ll[j])
            if sum < ans:
                sum = ans
print(sum)

Submission status: Runtime Error

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

count = 0
x = int((T+0.5)/A)
for i in range(1,x+1):
    count += B

print(count)

Submission status: Runtime Error

Solution code:
vb

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

n=int(input())
a=[0] + list(map(int,input().split())) + [0]#a[n+1]=0とするため

l=[0]*(n+2)
r=[0]*(n+2)#r[n+1]=0としたいから
for i in range(1,n+1):
    l[i] = gcd(l[i-1],a[i])
for i in range(n,0,-1):
    r[i] = gcd(r[i+1],a[i])

z=[gcd(l[i-1],r[i+1]) for i in range(1,n+1)]

print(max(z))

Submission status: Runtime Error

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

sum=0
for i in range(n):
  if V[i]>C[i]:
      sum+=V[i]-C[i]
print(sum)

Submission status: Runtime Error

Solution code:
import itertools
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

lv = []
lc = []
diff = []
for i in range(1,n+1):
    for p in itertools.combinations(v,i):
        lv.append(sum(p))
    for p in itertools.combinations(c,i):
        lc.append(sum(p))
for i in range(len(lv)):
    diff.append(lv[i]-lc[i])
print(0 if max(diff)<0 else max(diff))

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)
ans = 0
N = int(input())
A = list(map(int,input().split()))
for i in range(N):
    A_new = A[:i] + A[i+1:]
    ans = max(ans, gcd(*A_new))
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
vs=list(map(int, input().split()))
cs=list(map(int, input().split()))
s=[v-c for v,c in zip(vs,cs) if v-c>0]
print(sum(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(T//A*B)

Submission status: Runtime Error

Solution code:
a,b,t= map(int, input().split())
s=(10*t+5)//a
print(sb)

Submission status: Runtime Error

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

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,input().split())
print((t+0.5)＊b/a)

Submission status: Runtime Error

Solution code:
a,b,c=(int(x) for x in input().split())
cookie = 0
c = c-0.5
for x in range(c):
  if x % a == 0:
    cookie += b
print(b)

Submission status: Runtime Error

Solution code:
a,b,c=(int(x) for x in input().split())
cookie = 0
for x in range(c-0.5):
  if x % a == 0:
    cookie += b
print(b)

Submission status: Runtime Error

Solution code:
a=int(input())
v= list(map(int,input().split()))
c= list(map(int,input().split()))
ans=0
for vq,cq in zip(v,c):
  if vq>cq:
    ans+=(vq-cq)
    
print(ans)

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input().split())
 
ans=[]
while a<=t+0.5:
  ans.appen(b)
  a+=a
  
print(sum(ans))

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())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
v=list(map(int, input().split()))
c=list(map(int, input().split()))
t=[i-j,if i-j>0 else 0 for i,j in zip(v,c)]
print(sum(t))

Submission status: Runtime Error

Solution code:
n=input()
v=list(map(int, input().split()))
c=list(map(int, input().split()))
for i in range(n)
t[i]=v[i]-c[i]
a=0
for i in range(n)
if t[i]>0 :
a+=t[i]
print(a)

Submission status: Runtime Error

Solution code:
import numpy as np
n=input()
v=np.array(map(int, input().split()))
c=np.array(map(int, input().split()))
t=v-c
a=0
for i in range(n)
if t[i]>0 :
a+=t[i]
print(a)

Submission status: Runtime Error

Solution code:

a,b,t=map(int,input())

res = 0
for k in range(1,10000):
    now = k * a
    if now < t:
        res += b

print(res)

Submission status: Runtime Error

Solution code:
a, b, t = map(int, input().split())
 
count = 0
for i range(1, t+1, a):
    count += i * b
print(count)

Submission status: Runtime Error

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

count = 0
for i range(1, t+1, a):
  count += i * b
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
V = [int(line) for line in input().split()]
C = [int(line) for line in input().split()]
dif = [(V[i]-C[i]) for i in range(N)]

ans = 0
for i in range(N):
    if dif[i] > 0:
        ans += dif[i]
print(ans)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
n = 0
for　n  in range(1,21):
    A = A * n
    if A < T:
        food += B 
    

print(food)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
n = 0
for　n  in range(1,21):
    A = A * n
    if A < T:
        break
    food += B 
    

print(food)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
for　n  in range(1,21):
    A = A * n
    if A < T:
        break
    food += B 
    

print(food)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
for　n  in range(1,21):
    A = A*n
    if A < T:
        food += B 
    else:
        continue

print(food)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
for　n  in range(1,21):
    if A*n < T:
        food += B 
    else:
        continue

print(food)

Submission status: Runtime Error

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

T = T + 0.5
food = 0
for　n  in range(21):
    if A*n < T:
        food += B 
    else:
        print(food)

Submission status: Runtime Error

Solution code:
n = int,input()

integer = int(0)
v = input().split()

c = input().split()

for i in range(n):
    if int(v[i])>int(c[i]):
       integer += int(v[i])-int(c[i])
       continue
print(integer)

Submission status: Runtime Error

Solution code:
n=int(input())
listv=[int(x) for x in input().split()]
listc=[int(y) for y in input().split()]
values=[x - y for (x, y) in zip(listv, listc)]
ans = 0
for i in values:
  if i>0:
    ans+=i
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input.split())
if t >= a:print((t//a)*b)
else:print(0)

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input.split())
if t >= a:print(b*(t//a))
else:print(0)

Submission status: Runtime Error

Solution code:
a,b,t=map(int,input.split())
if t > a:print(b*(t//a))
else:print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, T = map(int, input().split())
a = T // A
total = 0

if i in range(a):
  total += B
  
print(total)

Submission status: Runtime Error

Solution code:
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
s = 0
for i in range(n):
    s += max(0,v[i]-c[i])
print(s)

Submission status: Runtime Error

Solution code:
A,B,T = list(map(float,input().split()))
T += 0.5 
T -= A
while T > 0:
  SUM += B
  T -= A
print(int(B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int, input().split()))
mina = 10**9
minus = 0
sumA = 0
for a in A:
    if a < 0:
        minus += 1
        a = -a
    sumA += a
    mina = min(a, mina)
if minus % 2 == 1:
    sumA -= 2 * mina
print(sumA)

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = list(map(int, input().split()))
forward = [0, a[0]]
back =[0, a[n-1]]
for i in range(1,n-1):
    forward.append(fractions.gcd(forward[i], a[i]))
    back.append(fractions.gcd(back[i], a[n-i-1]))

back.reverse()

ans = max(forward[n-2], back[0])
for i in range(n-2):
    ans = max(ans, fractions.gcd(forward[i], back[i]))
print(ans)

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
li[0] = A
li[1] = B
li[2] = T
ans = int(T / A) * B
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
xlist=[]
ylist=[]
v=list(map(int,input().split()))
c=list(map(int,input().split()))
for i in range(n):
  if v[i]>c[i]:
    xlist.append(v[i])
    ylist.append(c[i])
ans=sum(xlist)-sum(ylist)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))

ans = 0
count = 0
for i in range(n):
    if a[i] < 0:
        a[i] = -a[i]
        count += 1
    ans += a[i]

if count % 2 == 0:
    print(ans)
else:
    print(ans - min(a) * 2)

Submission status: Runtime Error

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

p_m=1
for n in range(N):
    p_m*=LA[n]
    
LA_absolute=[i*(-1) if i<0 else i for i in LA]


if p_m>=0:
    print(sum(LA_absolute))
else:
    print(sum(LA_absolute)-2*min(LA_absolute))

Submission status: Runtime Error

Solution code:
N=int(input())
LA=list(map(int,input().split()))
ans=[]

def gcd(m,n):
    while n:
        m,n=n,m%n
    return m

from functools import reduce
def multigcd(item):
    return reduce(gcd, item)

for n in range(N):
    L=LA[:n]+LA[n+1:]
    ans.append(multigcd(L))

print(max(ans))

Submission status: Runtime Error

Solution code:
N = int(input())
nums = [int(i) for i in input().split()]
from fractions import gcd
from functools import reduce
def compute_gcd(numbers):
    return reduce(gcd, numbers)
from copy import copy
gcds = []
for i in range(len(nums)):
    n = copy(nums)
    n.pop(i)
    gcds.append(compute_gcd(n))
print(max(gcds))

Submission status: Runtime Error

Solution code:
N = int(input())
nums = [int(i) for i in input().split()]
from math import gcd
from functools import reduce
def compute_gcd(numbers):
    return reduce(gcd, numbers)
from copy import copy
gcds = []
for i in range(len(nums)):
    n = copy(nums)
    n.pop(i)
    gcds.append(compute_gcd(n))
gcds = list(set(gcds))
print(gcds[-1])

Submission status: Runtime Error

Solution code:
import fractions
N = int(input())
A = list(map(int, input().split()))
ans = A[0]
ansmax = 0
for skip in range(N):
    if skip == 0:
        start = 2
        ans = A[1]
    else:
        start = 1
        ans = A[0]
    for i in range(start, N):
        if skip == i:
            continue
        ans = fractions.gcd(ans, A[i])
    if ansmax < ans:
        ansmax = ans
print(ansmax)

Submission status: Runtime Error

Solution code:

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A_reverse = list(reversed(A))
    left = [0]
    right = [0]
    answer = []
    for n in range(N):
        left.append(gcd(left[n], A[n]))
        right.append(gcd(right[n], A_reverse[n]))
    del left[N]
    del right[N]
    right.reverse()
    for n in range(N-1):
        answer.append(gcd(left[n], right[n]))
    print(max(answer))


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


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

l = list(itertools.combinations(a,n-1))
ans = 0

for itr in l:
    ans = max(ans, reduce(gcd, list(itr)))

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = O
for i in range(N) :
    if V[i] > C[i]:
        s +=V[i] - C[i]
    
print(s)

Submission status: Runtime Error

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

n = int(raw_input())

lst = []

for i in xrange(n):
 name,p=map(str,raw_input().split())
 lst.append([i+1,name,int(p)])
lst.sort(key=lambda x:(x[1],-x[2]))
for i in xrange(n):
  print lst[i][0]