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

Submission attempts (in order):
# _*_ 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)

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)



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)


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)




A, B, T= map(int, input().split())
ans = (T/A)*B
print("{}".format(ans))

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)

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)

 

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)


A, B, T= map(int, input().split())
ans = (int(T/A))*B
print("{}".format(ans))



Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted