Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03545 (python)

Fixed submission:
def main():
    A, B, C, D = input()
    for i in range(2**3):
        op = ['+', '+', '+']
        for j in range(len(op)):
            if (i >> j) & 1:
                op[j] = '-'
        if eval(A + op[0] + B + op[1] + C + op[2] + D) == 7:
            print(A + op[0] + B + op[1] + C + op[2] + D + '=7')
            break
    
                
                
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    A, B, C, D = input()
    for i in range(2):
        ans = int(A)
        if i == 0:
            ans += int(B)
        else:
            ans -= int(B)
        for j in range(2):
            if j == 0:
                ans += int(C)
            else:
                ans -= int(C)
            for k in range(2):
                if k == 0:
                    ans += int(D)
                else:
                    ans -= int(D)
                
                if ans == 7:
                    l = [i, j, k]
        
    op = []
    for ele in l:
        if ele == 0:
            op.append('+')
        else:
            op.append('-')
    print(A + op[0] + B + op[1] + C + op[2] + D + '=7')
                    
                
                
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    A, B, C, D = input()
    for i in range(2):
        ans = int(A)
        if i == 0:
            ans += int(B)
        else:
            ans -= int(B)
        for j in range(2):
            if j == 0:
                ans += int(C)
            else:
                ans -= int(C)
            for k in range(2):
                if k == 0:
                    ans += int(D)
                else:
                    ans -= int(D)
                
                if ans == 7:
                    l = [i, j, k]
        
    op = []
    for ele in l:
        if ele == 0:
            op.append('+')
        else:
            op.append('-')
    print(A + op[0] + B + op[1] + C + op[2] + D + '=7')
                    
                
                
if __name__ == '__main__':
    main()
Problem p03599 (python)

Fixed submission:
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range(F//(100*A) +1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range((F-water)//C+1):
            for l in range((F-water-C*k)//D+1):
                sugar = C*k + D*l
                if density <= sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])

Buggy submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range(F//(100*A) +1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range((F-water)//C+1):
            for l in range((F-water-C*k)//D+1):
                sugar = C*k + D*l
                if density < sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])

Buggy submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range((F//(100*A)) +1):
    for j in range(((F-100*A*i)//(100*B))+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range(((F-water)//C)+1):
            for l in range(((F-water-C*k)//D)+1):
                sugar = C*k + D*l
                if density < sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])

Buggy submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range(F//(100*A) +1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range((F-water)//C+1):
            for l in range((F-water-C*k)//D+1):
                sugar = C*k + D*l
                if density < sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans[0], ans[1])

Buggy submission (verdict: Runtime Error):
A, B, C, D, E, F = map(int, input().split())
density = 0
for i in range(F//(100*A) +1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*A*i + 100*B*j
        if water == 0:
            continue
        for k in range((F-water)//C+1):
            for l in range((F-water-C*k)//D+1):
                sugar = C*k + D*l
                if density < sugar/(sugar + water) and sugar <= (E/100)*water:
                    density = sugar/(sugar + water)
                    ans = [sugar+water, sugar]
print(ans)
Problem p03610 (python)

Fixed submission:
s = input()
t = ''
i = 0
while i <= len(s)-1:
  t += s[i]
  i += 2
print(t)

Buggy submission (verdict: Runtime Error):
s = input()
for i in len(s):
  if i%2 == 0:
    print(s[i], end = "")

Buggy submission (verdict: Runtime Error):
s = input()
for i in len(s):
  if i%2 == 0:
    print(s[i], end = '')

Buggy submission (verdict: Runtime Error):
s = input()
t = ''
i = 0
while i <= len(s-1):
  t += s[i]
  i += 2
print(t)

Buggy submission (verdict: Runtime Error):
s = input()
t = ''
i = 0
while i <= len(s):
  t += s[i]
  i += 2
print(t)

Buggy submission (verdict: Runtime Error):
s = input()
t = ''
while i <= len(s):
  t += s[i]
  i += 2
print(t)

Buggy submission (verdict: Runtime Error):
s = input()
t = ''
while i <= len(s):
  t += s[i]
  i += 2
print(s)
Problem p03624 (python)

Fixed submission:
s = list(input())
s = set(s)
alpha = set('abcdefghijklmnopqrstuvwxyz')
if s == alpha:
  print('None')
else:
  ans = sorted(alpha - s)
  print(ans[0])

Buggy submission (verdict: Runtime Error):
s = list(input())
s = set(s)
alpha = set('abcdefghijklmnopqrstuvwxyz')
ans = sorted(alpha - s)
print(ans[0])
Problem p03636 (python)

Fixed submission:
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
c = 0
for i in s:
  c += 1
print(s[0] + (c-2) + s[-1])
Problem p03644 (python)

Fixed submission:
a = 0
ans = 0
N = int(input())
for i in range(1, N+1) :
  p = 0
  x = i
  while x % 2 == 0 :
    x //= 2
    p += 1
  if a <= p :
    a = p
    ans = i
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
ans = 1
while ans < N:
  ans *= 2
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
ans = 1
while a < N:
  ans *= 2
print(ans)

Buggy submission (verdict: Runtime Error):
a = 0
ans = 0
N = input()
for i in range(1, N) :
  p = 0
  while i % 2 == 0 :
    i //= 2
    p += 1
  if a < p :
    a = p
    ans = i
print(ans)

Buggy submission (verdict: Runtime Error):
a = 0
ans = 0
N = input()
for i in range(1, N) :
  p = 0
  while i % 2 == 0 :
    N //= 2
    p += 1
  if a < p :
    a = p
    ans = i
print(ans)

Buggy submission (verdict: Runtime Error):
a = 0
ans = 0
N = input()
for i in N :
  p = 0
  while i % 2 == 0 :
    N //= 2
    p += 1
  if a < p :
    a = p
    ans = i
print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
p = 0
while N % 2 == 0 :
  N //= 2
  p += 1
print(p)
Problem p03658 (python)

Fixed submission:
n, k = map(int, input().split())
l = sorted(map(int, input().split())) [::-1]
print(sum(l[:k]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
l = sorted(map(int, input().split()), reverse=True)
ans = 0
ans += l[i] for i in range(K)
print(ans)
Problem p03693 (python)

Fixed submission:
r, g, b = map(int, input().split())
if (10*g + b) % 4 == 0 :
  print('YES')
else :
  print('NO')

Buggy submission (verdict: Runtime Error):
r, g, b = map(int, input().split())

if (10g + b) % 4 == 0:
  print('YES')
else:
  print('NO')
Problem p03814 (python)

Fixed submission:
s = input()
a = s.find('A')
b = s.rfind('Z')
print(b-a+1)

Buggy submission (verdict: Runtime Error):
s = input()
i = 0
while s[i] != 'A':
  i += 1
s.reverse()
j = 0
while s[j] != 'Z':
  j += 1
print(j-i+1)
Problem p02687 (python)

Fixed submission:
s= input()
if s == 'ABC':
  print('ARC')
elif s == 'ARC':
  print('ABC')

Buggy submission (verdict: Runtime Error):
import numpy as np
n,m = map(int,input().split())
H = list(map(int,input().split()))
A=np.zeros((n,n))
for i in range(m):
    a,b=input().split()
    A[int(a)-1][int(b)-1]=1
    A[int(b)-1][int(a)-1]=1
count = 0    
for i in range(n):
  best = H[i]
  for j in range(n):
      if A[i][j]==1 and best <= H[j]:
        best = H[j]
  if best == H[i]:
    count += 1
print(count)
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
if s == t[:-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = list(input())
    t = list(input())
    x = len(s)
    y = len(t)
    ans = "Yes"
    for i in range(x):
      if (s[i] == t[i]) and (x+1 == y):
        ans = "Yes"
        continue
      else:
        ans = "No"
        break
    print(ans)    
      
    return

#Solve
if __name__ == "__main__":
    solve()

Buggy submission (verdict: Runtime Error):
sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = list(input())
    t = list(input())
    x = len(s)
    y = len(t)
    ans = "Yes"
    for i in range(x):
      if (s[i] == t[i]) and (x+1 == y):
        ans = "Yes"
        continue
      else:
        ans = "No"
        break
    print(ans)    
      
    return

#Solve
if __name__ == "__main__":
    solve()
Problem p02719 (python)

Fixed submission:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n,k = map(int,input().split())
    print(min(n%k,-n%k))
    return

#Solve
if __name__ == "__main__":
    solve()

Buggy submission (verdict: Runtime Error):
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]
 
sys.setrecursionlimit(1000000)
mod = 1000000007
 
def solve():
    n,k = map(int,input().split())
    if n%k == 0:
      print(0)
    else:
      print(math.gcd(n,k))
    
    return
 
#Solve
if __name__ == "__main__":
    solve()

Buggy submission (verdict: Runtime Error):
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n,k = map(int,input().split())
    if n%k == 0:
      print(0)
    else:
      print(math.gcd(n,k))
    
    return

#Solve
if __name__ == "__main__":
    solve()
Problem p02641 (python)

Fixed submission:
x, n = map(int, input().split())
p = sorted(list(map(int, input().split())))
l = [int(i) for i in range(-200, 201)]
ll = []
for idx in l:
    if idx not in p:
        ll.append(idx)
mn = 1000
if len(ll) == 0:
    print("")
else:
    mn = 1000
    for i in range(len(ll)):
        if abs(ll[i] - x) < mn:
            mn = abs(ll[i] - x)
            ans = ll[i]
    print(ans)

Buggy submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = sorted(list(map(int, input().split())))
l = [int(i) for i in range(1, 101)]
ll = []
for idx in l:
    if idx not in p:
        ll.append(idx)
mn = abs(ll[0] - x)
ans = ll[0]
for i in range(len(ll)):
    if abs(ll[i] - x) < mn:
        mn = abs(ll[i] - x)
        ans = ll[i]
print(ans)
Problem p02660 (python)

Fixed submission:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n //= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
a = sorted(divisor(n))
cnt = 0
for i in range(1, len(a)):
    b = prime_decomposition(a[i])
    if len(list(set(b))) == 1:
        if n % a[i] == 0:
            n //= a[i]
            cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n //= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
a = divisors(n)
cnt = 0
for i in range(1, len(a)):
    b = prime_decomposition(a[i])
    if len(list(set(b))) == 1:
        if n % a[i] == 0:
            n //= a[i]
            cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
from sympy import divisors
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()
    return divisors
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n //= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

n = int(input())
a = make_divisors(n)
cnt = 0
for i in range(1, len(a)):
    b = prime_decomposition(a[i])
    if len(list(set(b))) == 1:
        if n % a[i] == 0:
            n //= a[i]
            cnt += 1
print(cnt)
Problem p02780 (python)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0
mx = []
for i in range(n):
    pex = (1+p[i])/2
    mx.append(pex+nxt)
    nxt = pex + nxt
if n == k:
    print(mx[-1])
else:
    ans = []
    for i in range(n-k):
        ans.append(mx[i+k] - mx[i])
    print(max(ans))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0.000000000001
mx = []
for i in range(n):
    pex = (1+p[i]+0.000000000001)/2
    mx.append(pex+nxt)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0.000000000001
mx = []
for i in range(n):
    pex = (1+p[i])/2+0.000000000001
    mx.append(pex+nxt)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0.000000000001
mx = []
for i in range(n):
    pex = (1+p[i])/2
    mx.append(pex+nxt+0.000000000001)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i]+0.000000000001)
print(max(ans))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0
mx = []
for i in range(n):
    pex = (1+p[i])/2
    mx.append(pex+nxt)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans)+0.000000000001)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split()))
nxt = 0
mx = []
for i in range(n):
    pex = (1+p[i])/2
    mx.append(pex+nxt)
    nxt = pex + nxt
ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans))

Buggy submission (verdict: Runtime Error):
from itertools import accumulate
n, k = map(int, input().split())
p = list(map(int, input().split()))
pex = [(1+n)/2 for n in p]
pex = list(accumulate(pex))
ans = []
for i in range(n-k):
    ans.append(pex[i+k] - pex[i])
print(max(ans))

Buggy submission (verdict: Runtime Error):
from itertools import accumulate
n, k = map(int, input().split())
p = list(map(int, input().split()))
pex = [(1+n)/2 for n in p]
mx = [0] + pex
mx = list(accumulate(mx))

ans = []
for i in range(n-k):
    ans.append(mx[i+k] - mx[i])
print(max(ans))
Problem p02844 (python)

Fixed submission:
n = int(input())
s = input()
ans = 0
for i in range(1000):
    tg = str(i + 1000)[1:]
    if tg[0] not in s:
        continue
    else:
        x2 = s[s.index(tg[0]) + 1:]
        if tg[1] not in x2:
            continue
        else:
            x3 = x2[x2.index(tg[1]) + 1:]
            if tg[2] not in x3:
                continue
            else:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
S = list(input())
sl = itertools.combinations(S, 3)
sl_s = set(sl)
print(len(sl_s))
Problem p02995 (python)

Fixed submission:
a, b, c ,d = map(int, input().split())
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def lcm(a,b):
      return a*b//gcd(a,b)
e = lcm(c, d)
wareru = b//c + b//d - b//e - ((a-1)//c + (a-1)//d - (a-1)//e)
print(b-a+1-wareru)

Buggy submission (verdict: Runtime Error):
import math
a, b, c ,d = map(int, input().split())
e = int((c * d) / math.gcd(c, d))
wareru = (int(b/c) + int(b/d) - int(b/e) - (int((a-1)/c) + int((a-1)/d) - int((a-1)/e)))
print(b-a+1-wareru)

Buggy submission (verdict: Runtime Error):
import math
a, b, c ,d = map(int, input().split())
e = (c * d) // math.gcd(c, d)
wareru = (int(b/c) + int(b/d) - int(b/e) - (int((a-1)/c) + int((a-1)/d) - int((a-1)/e)))
print(b-a+1-wareru)

Buggy submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

a, b, c ,d = map(int, input().split())
e = lcm(c, d)
wareru = (int(b/c) + int(b/d) - int(b/e) - (int((a-1)/c) + int((a-1)/d) - int((a-1)/e)))
print(b-a+1-wareru)
Problem p03280 (python)

Fixed submission:
a, b = map(int,input().split())
print(a*b - a - b + 1)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print(a*b - a - b + 1)
Problem p03309 (python)

Fixed submission:
import numpy as np

n = int(input())
a = list(map(int,input().split()))
b = []
cnt = 1
for num in a:
    num -= cnt
    b.append(num)
    cnt += 1
test = [int(np.mean(b))-1,int(np.mean(b)),int(np.mean(b))+1,int(np.median(b))]
test = list(set(test))
ans = []
s = 9999999999999
for i in test:
    cnt = 1
    c = []
    for num in a:
        st = 0
        st = abs(num - (i+cnt))
        c.append(st)
        cnt += 1
    ans.append(np.sum(c))
print(np.min(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = []
cnt = 1
for num in a:
    num -= cnt
    b.append(num)
    cnt += 1
test = [int(mean(b))-1,int(mean(b)),int(mean(b))+1]
ans = []
s = 9999999999999
for i in test:
    cnt = 1
    c = []
    for num in a:
        st = 0
        st = abs(num - (i+cnt))
        c.append(st)
        cnt += 1
    ans.append(sum(c))
print(min(ans))

Buggy submission (verdict: Runtime Error):
from statistics import mode
n = int(input())
a = list(map(int,input().split()))
b = []
c = []
cnt = 1
for num in a:
    num -= cnt
    b.append(num)
    cnt += 1
if sum(b) != 0:
    cnt = 1
    for num in a:
        st = 0
        st = abs(num - (mode(b) + cnt))
        c.append(st)
        cnt += 1
    print(sum(c))
else:
    print(sum(b))
Problem p03323 (python)

Fixed submission:
a, b = map(int,input().split())
if a<=8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a<=8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a<=8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a<=8 and b <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03612 (python)

Fixed submission:
n = int(input())
pp = list(map(int, input().split()))
cnt = 0
for i in range(n-1):
    if pp[i] == i + 1:
        pp[i], pp[i+1] = pp[i+1], pp[i]
        cnt += 1
if pp[n-1] == n:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
pp = list(map(int, input().split()))
cnt = 0
for idx, p in enumerate(pp):
    if p == idx + 1:
        pp[idx], pp[idx+1] = pp[idx+1], pp[idx]
        cnt += 1
print(cnt)
Problem p03633 (python)

Fixed submission:
n = int(input())
lcmn = 1
def gcd(a, b):
    while b!=0:
        a, b = b, a%b
    return a
def lcm(a, b):
    return a*b//gcd(a, b)
for _ in range(n):
    t = int(input())
    lcmn = lcm(lcmn, t)
print(lcmn)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
lcmn = 1
def lcm(a, b):
    return a*b//math.gcd(a, b)
for _ in range(n):
    t = int(input())
    lcmn = lcm(lcmn, t)
print(lcmn)
Problem p02639 (python)

Fixed submission:
def main():
  nums = list(map(int,input().split()))
  for i,n in enumerate(nums):
    if n == 0:
      return i + 1

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

Buggy submission (verdict: Runtime Error):
def main():
  for i,n in enumerate(list(map(int,input().split()))):
  	if n == 0:
    	return i + 1

if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):
def main():
  for i,n in enumerate(map(int,input().split())):
  	if n == 0:
    	return i

if __name__ == '__main__':
  main()