Buggy python submission (verdict: Runtime Error):
# -*- 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)


Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)

Buggy python submission (verdict: Runtime Error):
# -*- 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)


Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)

Buggy python submission (verdict: Runtime Error):
# -*- 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)


Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)

Buggy python submission (verdict: Runtime Error):
# -*- 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)


Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)

Buggy python submission (verdict: Runtime Error):
# -*- 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)

Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)

Buggy python submission (verdict: Runtime Error):
# -*- 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)


Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  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)