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

Fixed submission:
import numpy as np
Sa = input()
Sb = input()
Sc = input()

def string2int(in_list):
    out_list = np.array(in_list, dtype='S')
    out_list[out_list==b'a'] = 0
    out_list[out_list==b'b'] = 1
    out_list[out_list==b'c'] = 2
    return np.array(out_list, dtype=int)
Sa = string2int(list(Sa))
Sb = string2int(list(Sb))
Sc = string2int(list(Sc))
ALL = [list(Sa), list(Sb), list(Sc)]

current = 0
pre = 0
while True:
    left = len(ALL[current])
    if left == 0:
        break
    current = ALL[current][0]
    ALL[pre] = ALL[pre][1:]
    pre = current

cor = ['A','B','C']
print( cor[current] )

Buggy submission (verdict: Runtime Error):
import numpy as np
Sa = input()
Sb = input()
Sc = input()

def string2int(in_list):
  out_list = np.array(in_list, dtype='S')
  out_list[out_list=='a'] = 0
  out_list[out_list=='b'] = 1
  out_list[out_list=='c'] = 2
  return np.array(out_list, dtype=int)
Sa = string2int(list(Sa))
Sb = string2int(list(Sb))
Sc = string2int(list(Sc))
ALL = [list(Sa), list(Sb), list(Sc)]

current = 0
pre = 0
while True:
  left = len(ALL[current])
  if left == 0:
    break
  current = ALL[current][0]
  ALL[pre] = ALL[pre][1:]
  pre = current

cor = ['A','B','C']
print( cor[current] )
Problem p04007 (python)

Fixed submission:
import numpy as np
import copy

a = map(int,raw_input().split())
H = a[0]
W = a[1]
A = []
for idx in xrange(H):
  A.append( list(raw_input()) )

def textMap(A):
  A = np.array(A, dtype='S')
  A[A!='0'] = '#'
  A[A=='0'] = '.'
  texts = []
  for vec in A:
    texts.append( ''.join(vec) )
  return '\n'.join(texts)

def myfunc(H,W,A):
  A = np.array(A)
  A[A=='#'] = 1
  A[A=='.'] = 0
  A = np.array(A, dtype=np.int)
  T = np.zeros((H,W), dtype=np.int)
  O = np.zeros((H,W), dtype=np.int)
  T[:,0] = 1
  O[:,-1] = 1
  if H%2 == 0:
    for idx in xrange(H/2):
      T[idx*2,1:-1] = 1
      O[idx*2+1,1:-1] = 1
  else:
    for idx in xrange(H/2):
      T[idx*2,1:-1] = 1
      O[idx*2+1,1:-1] = 1
    T[-1,1:-1] = 1
  T[A==1] += 1
  O[A==1] += 1

  tT = textMap(T)
  tO = textMap(O)
  print '\n'.join([tT,'',tO])

myfunc(H,W,A)

Buggy submission (verdict: Runtime Error):
import numpy as np
import copy

a = map(int,raw_input().split())
H = a[0]
W = a[1]
A = []
for idx in xrange(H):
  A.append( list(raw_input()) )

def textMap(A):
  A = np.array(A, dtype='S')
  A[A!='0'] = '#'
  A[A=='0'] = '.'
  texts = []
  for vec in A:
    texts.append( ''.join(vec) )
  return '\n'.join(texts)

def myfunc(H,W,A):
  A = np.array(A)
  A[A=='#'] = 1
  A[A=='.'] = 0
  A = np.array(A, dtype=np.int)
  T = np.zeros((H,W), dtype=np.int)
  O = np.zeros((H,W), dtype=np.int)
  T[:,0] = 1
  O[:,-1] = 1
  if H%2 == 0:
    for idx in xrange(H/2):
      T[idx*2,1:-1] = 1
      O[idx*2+1,1:-1] = 1
  else:
    for idx in xrange(H/2):
      T[idx*2,1:-1] = 1
      O[idx
Problem p04019 (python)

Fixed submission:
S = raw_input()
S = list(S)
S = set(S)
flagSN = False
flagEW = False
if ('N' in S and 'S' in S) or ('N' not in S and 'S' not in S):
  flagSN = True
if ('W' in S and 'E' in S) or ('W' not in S and 'E' not in S):
  flagEW = True
if flagSN and flagEW:
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
A = [0] * N
for idx in xrange(N):
  A[idx] = int(raw_input())
total =  0
pre = 0
for item in A:
  total += (item+pre) / 2
  if item == 0:
    pre = 0
  else:
    pre = (item+pre) % 2

print total

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(raw_input())
A = [0] * N
for idx in xrange(N):
  A[idx] = int(raw_input())
total =  0
pre = 0
for item in A:
  total += (item+pre) / 2
  if item == 0:
    pre = 0
  else:
    pre = (item+pre) % 2

print total
Problem p03160 (python)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))

a,b = 0, abs(h[0]-h[1])

for i in range(len(h)):
    if i > 1:
        a,b = b, min(abs(h[i-2]-h[i])+a, abs(h[i-1]-h[i])+b)
    
print(b)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))

a,b = 0, abs(h[0]-h[1])

for i in range(len(h)):
    if i > 1:
        a,b = b, min(abs(h[i-2]-h[i])+a, abs(h[i-1]-h[i])+b)
    
print(b)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))

a,b = 0, abs(h[0]-h[1])

for i in range(len(h)):
    if i > 1:
        a,b = b, min(abs(h[i-2]-h[i])+a, abs(h[i-1]+h[i])+b)
    
print(b)
Problem p03369 (python)

Fixed submission:
print((input().count("o"))*100+700)

Buggy submission (verdict: Runtime Error):
print(input().count()*3 +700)
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())

if N%500 <= A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,A = map(int, input().split())
if N%500=< A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,A = map(int, input().split())
if N%500<= A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,A = map(int, input().split())
if N%500< A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,A = map(int, input().split())
if N%500< A:
    print("YES")
else:
    print("NO")
Problem p03624 (python)

Fixed submission:
s = set(input())

if len(s) == 26:
    print("None")
else:
    print(sorted("".join(set("abcdefghijklmnopqrstuvwxyz") - s))[0])

Buggy submission (verdict: Runtime Error):
s = sorted(set(input()))
if len(s) ==26:
    print("None")
else:
    for i,k in enumerate("abcdefghijklmnopqrstuvwxyz"):
        if k != s[i]:
            print(k)
            break
Problem p02660 (python)

Fixed submission:
def main():
    n = int(input())
    if n == 1:
        print(0)
        return
    def eratos(n):
        flag = [True] * (n + 1)
        for i in range(2, int(n**0.5) + 1):
            if flag[i]:
                for j in range(2*i, n + 1, i):
                    flag[j] = False
        return [i for i, x in enumerate(flag) if x and i >= 2]
    p = eratos(10**6)
    work = []
    for i in p:
        piyo = 0
        while n % i == 0:
            n //= i
            piyo += 1
        if piyo > 0:
            work.append(piyo)
        if n == 1:
            break
    if len(work) == 0:
        print(1)
        return
    else:
        result = 0
        for i in work:
            for j in range(1, 10**6):
                i -= j
                if i <0:
                    break
                result += 1
    if n != 1:
        result += 1
    print(result)
main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    if n == 1:
        print(0)
        return
    def eratos(n):
        flag = [True] * (n + 1)
        for i in range(2, int(n**0.5) + 1):
            if flag[i]:
                for j in range(2*i, n + 1, i):
                    flag[j] = False
        return [i for i, x in enumerate(flag) if x and i >= 2]
    p = eratos(10**6)
    work = []
    for i in p:
        piyo = 0
        while n % i == 0:
            n //= i
            piyo += 1
        if piyo > 0:
            work.append(piyo)
        if n == 1:
            break
    if len(work) == 0:
        print(1)
        break
    else:
        result = 0
        for i in work:
            for j in range(1, 10**6):
                i -= j
                if i <0:
                    break
                result += 1
    if n != 1:
        result += 1
    print(result)
main()
Problem p02683 (python)

Fixed submission:
def main():
    n, m, x = map(int, input().split())
    ca = []
    for _ in range(n):
        ca.append(list(map(int, input().split())))
    result = 10**9
    for i in range(1, 2**n+1):
        work = 0
        j = 0
        temp = [0] * m
        for flag in bin(i)[2:].zfill(n):
            if flag == "1":
                work += ca[j][0]
                for k in range(1, m+1):
                    temp[k-1] += ca[j][k]
            j += 1
        flag = True
        for t in temp:
            if t < x:
                flag = False
                break
        if flag:
            result = min(result, work)
    if result == 10**9:
        print(-1)
    else:
        print(result)
main()

Buggy submission (verdict: Runtime Error):
def main()
    n, m, x = map(int, input().split())
    ca = []
    for _ in range(n):
        ca.append(list(map(int, input().split())))
    result = 10**9
    for i in range(1, 2**n+1):
        work = 0
        j = 0
        temp = [0] * m
        for flag in bin(i)[2:].zfill(n):
            if flag == "1":
                work += ca[j][0]
                for k in range(1, m+1):
                    temp[k-1] += ca[j][k]
            j += 1
        flag = True
        for t in temp:
            if t < x:
                flag = False
                break
        if flag:
            result = min(result, work)
    if result == 10**9:
        print(-1)
    else:
        print(result)
main()
Problem p02692 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
result = []
def calc(a, b, c, i):
    if a < 0 or b < 0 or c < 0:
        return False
    if i >= N:
        return True
    command = s[i]
    if command == "AB":
        if calc(a+1, b-1, c, i+1):
            result.append("A")
            return True
        if calc(a-1, b+1, c, i+1):
            result.append("B")
            return True
        return False
    elif command == "AC":
        if calc(a+1, b, c-1, i+1):
            result.append("A")
            return True
        if calc(a-1, b, c+1, i+1):
            result.append("C")
            return True
        return False
    elif command == "BC":
        if calc(a, b-1, c+1, i+1):
            result.append("C")
            return True
        if calc(a, b+1, c-1, i+1):
            result.append("B")
            return True
        return False
def main():
    global N, s
    N, A, B, C = map(int, input().split())
    s = [input() for _ in range(N)]
    if calc(A, B, C, 0):
        print("Yes")
        for c in result[::-1]:
            print(c)
    else:
        print("No")
main()

Buggy submission (verdict: Runtime Error):
result = []
def calc(a, b, c, i):
    if i >= N:
        if a < 0 or b < 0 or c < 0:
            return False
        return True
    command = s[i]
    if command == "AB":
        if calc(a+1, b-1, c, i+1):
            result.append("A")
            return True
        if calc(a-1, b+1, c, i+1):
            result.append("B")
            return True
        return False
    elif command == "AC":
        if calc(a+1, b, c-1, i+1):
            result.append("A")
            return True
        if calc(a-1, b, c+1, i+1):
            result.append("C")
            return True
        return False
    elif command == "BC":
        if calc(a, b-1, c+1, i+1):
            result.append("C")
            return True
        if calc(a, b+1, c-1, i+1):
            result.append("B")
            return True
        return False
def main():
    global N, s
    N, A, B, C = map(int, input().split())
    s = [input() for _ in range(N)]
    if calc(A, B, C, 0):
        print("Yes")
        for c in result[::-1]:
            print(c)
    else:
        print("No")
main()
Problem p02702 (python)

Fixed submission:
def main():
    S = input()
    work, temp = [0] * 2019, 0
    work[0] = 1
    a = 1
    for s in S[::-1]:
        temp += int(s) * a
        work[temp%2019] += 1
        a *= 10
        a %= 2019
    print(sum([w*(w-1)//2 for w in work]))
main()

Buggy submission (verdict: Runtime Error):
def main():
    S = input()
    N = len(S)
    S = int(S)
    work, temp = 0, [0] * 2019, 0
    for i in range(N+1): work[(S % 10**i) % 2019] += 1
    print(sum([w*(w-1)//2 for w in work]))
main()
Problem p02732 (python)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
counter = Counter(a)
d = [0]*(n+1)
count = 0
for el, cnt in counter.most_common():
    d[el] = cnt
    count += cnt*(cnt-1)
count //= 2
for el in a:
    print(count - d[el] + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
d = [0]*n
count = 0
for el in a:
    temp = d[el]
    if temp == 0:
        temp = a.count(el)
        d[el] = temp
    count += temp-1
count //= 2
for el in a:
    print(count - d[el] + 1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
d = [0]*n
count = 0
for el in a:
    temp = a.count(el)
    count += temp-1
    d[el] = temp
count //= 2
for el in a:
    print(count - d[el]+1)
Problem p02780 (python)

Fixed submission:
from collections import deque
n, k = map(int, input().split())
p = list(map(int, input().split()))
p = [(1/num)*(num)*(num+1)/2 for num in p]
d = deque(p[:k])
result = temp = sum(d)
popleft = d.popleft
dappend = d.append
for el in p[k:]:
    temp -= popleft()
    dappend(el)
    temp += el
    if result < temp:
        result = temp
print(result)

Buggy submission (verdict: Runtime Error):
from collections import deque
n, k = map(int, input().split())
p = list(map(int, input().split()))
p = [(1/num)*(num)*(num+1)/2 for num in p]
d = deque(p[:k])
result = deque()
append = result.append
for el in p[k:]:
    d.popleft()
    d.append(el)
    append(sum(d))
print(max(result))
Problem p02803 (python)

Fixed submission:
from collections import deque
h, w = map(int, input().split())
s = [list(input()) for i in range(h)]
work = [[[] for j in range(w)] for i in range(h)]
result = 0
for i in range(h):
    for j in range(w):
        append = work[i][j].append
        if i<h-1 and s[i+1][j] == ".":
            append([i+1,j])
        if i>0 and s[i-1][j] == ".":
            append([i-1,j])
        if j<w-1 and s[i][j+1] == ".":
            append([i,j+1])
        if j>0 and s[i][j-1] == ".":
            append([i,j-1])
q = deque()
popleft = q.popleft
append = q.append
for i in range(h):
    for j in range(w):
        if s[i][j] != ".":
            continue
        q.clear()
        q.append([i, j])
        temp = [[i, j]]
        tempappend = temp.append
        d = -1
        count = 1
        counter = 0
        for k in range(w*h):
            x, y = popleft()
            count -= 1
            for el in work[x][y]:
                if el not in temp:
                    counter += 1
                    append(el)
                    tempappend(el)
            if count == 0:
                d += 1
                count = counter
                counter = 0
            if len(q) == 0:
                break
        result = result if result>d else d
    if result == h+w-2:
        break
print(result)

Buggy submission (verdict: Runtime Error):
work = [[[] for j in range(w)] for i in range(h)]
result = 0
for i in range(h):
    for j in range(w):
        append = work[i][j].append
        if i<h-1 and s[i+1][j] == ".":
            append([i+1,j])
        if i>0 and s[i-1][j] == ".":
            append([i-1,j])
        if j<w-1 and s[i][j+1] == ".":
            append([i,j+1])
        if j>0 and s[i][j-1] == ".":
            append([i,j-1])
for i in range(h):
    for j in range(w):
        if s[i][j] != ".":
            continue
        q = deque([[i, j]])
        temp = [[i, j]]
        popleft = q.popleft
        append = q.append
        d = -1
        count = 1
        counter = 0
        for k in range(h*w):
            x, y = popleft()
            count -= 1
            for el in work[x][y]:
                if el not in temp:
                    counter += 1
                    append(el)
                    temp.append(el)
            if count == 0:
                d += 1
                count = counter
                counter = 0
            if len(q) == 0:
                break
        result = result if result>d else d
print(result)
Problem p02837 (python)

Fixed submission:
from collections import deque
n = int(input())
work = []
for i in range(n):
    a = int(input())
    work.append([list(map(int, input().split())) for i in range(a)])
result = 0
for i in range(2**n):
    state = bin(i)[2:].zfill(n)
    honest = []
    unkind = []
    for j in range(n):
        if state[j] == "0":
            unkind.append(j+1)
        else:
            honest.append(j+1)
    flag = True
    for human in honest:
        for x, y in work[human-1]:
            if y == 1 and x in unkind:
                flag = False
                break
            elif y == 0 and x in honest:
                flag = False
                break
        if not flag:
            break
    if flag:
        result = result if result>len(honest) else len(honest)
print(result)

Buggy submission (verdict: Runtime Error):
from collections import deque
n = int(input())
work = []
for i in range(n):
    a = int(input())
    work.append([list(map(int, input().split())) for i in range(a)])
result = 0
for i in range(n):
    count = 0
    d = deque([work[i]])
    honest = deque([i])
    unkind = deque()
    while len(d) > 0:
        human = d.popleft()
        for x, y in human:
            if y == 1:
                if x not in honest:
                    d.append(work[x-1])
                    honest.append(x)
            else:
                if x not in unkind:
                    unkind.append(x)
    finish = False
    while not finish:
        finish = True
        for i in range(1, n+1):
            if i not in honest and i not in unkind:
                flag = True
                for x, y in work[i-1]:
                    if y == 1 and x in unkind:
                        flag = False
                        break
                    elif y == 0 and x in honest:
                        flag = False
                        break
                    elif x not in honest+unkind:
                        finish = False
                if flag:
                    honest.append(i)
                else:
                    unkind.append(i)
    if len(set(honest) & set(unkind)) == 0:
        count = n - len(unkind)
        result = result if result > count else count
print(result)
Problem p02882 (python)

Fixed submission:
import math
a, b, x = map(int, input().split())
if a**2*b == x:
    s = 90
elif (a**2)*b/2 < x:
    s = math.degrees(math.atan(a/(2*(b-(x/(a**2))))))
else:
    s = math.degrees(math.atan(2*x/(a*b**2)))
print(90-s)

Buggy submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())
if (a**2)*b/2 < x:
    s = math.degrees(math.atan(2*a/(3*(b-(x/(a**2))))))
else:
    s = math.degrees(math.atan(2*x/(a*b**2)))
print(90-s)
Problem p02995 (python)

Fixed submission:
from fractions import gcd
def func(n):
    return n - (n//C + n//D - n//(C*D//gcd(C, D)))
A, B, C, D = map(int, input().split())
print(func(B) - func(A-1))

Buggy submission (verdict: Runtime Error):
from math import gcd
def func(n):
    return n - (n//C + n//D - n//(C*D//gcd(C, D)))
A, B, C, D = map(int, input().split())
print(func(B) - func(A-1))
Problem p03160 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**5)
N = int(input())
h = list(map(int, input().split()))
dp = [-1 for i in range(N)]
def rec(n):
    if dp[n] == -1:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            dp[n] = min(rec(n-2)+abs(h[n]-h[n-2]), rec(n-1)+abs(h[n]-h[n-1]))
    return dp[n]
rec(N-1)
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
import numpy as np
N, K = map(int, input().split())
h = np.array(list(map(int, input().split())))
dp = np.zeros(N,dtype=int)
for i in range(1, N):
    s=max(0, i-k)
    dp[i] = min(dp[s:i]+abs(h[s:i]-h[i]))
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))
dp = [-1 for i in range(N)]
def rec(n):
    if dp[n] == -1:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            dp[n] = min(rec(n-2)+abs(h[n]-h[n-2]), rec(n-1)+abs(h[n]-h[n-1]))
    return dp[n]
print(rec(N-1))

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))
dp = [10**6 for i in range(N)]
def rec(n):
    if dp[n] == 10**6:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            dp[n] = min(rec(n-2)+abs(h[n]-h[n-2]), rec(n-1)+abs(h[n]-h[n-1]))
    return dp[n]
print(rec(N-1))
Problem p03161 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
import numpy as np
N, K = map(int, input().split())
h = np.array(list(map(int, input().split())))
dp = np.zeros(N,dtype=int)
for i in range(1, N):
    s=max(0, i-K)
    dp[i] = min(dp[s:i]+abs(h[s:i]-h[i]))
print(dp[-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
import numpy as np
N, K = map(int, input().split())
h = np.array(list(map(int, input().split())))
dp = np.zeros(N,dtype=int)
for i in range(1, N):
    s=max(0, i-k)
    dp[i] = min(dp[s:i]+abs(h[s:i]-h[i])
print(dp[-1])

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**5)
N, K = map(int, input().split())
h = list(map(int, input().split()))
dp = [-1 for i in range(N)]
def rec(n):
    if dp[n] == -1:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            work = []
            for i in range(1, K+1):
                if n-i >= 0:
                    work.append(rec(n-i)+abs(h[n-i]-h[n]))
            dp[n] = min(work)
    return dp[n]
rec(N-1)
print(dp[N-1])
Problem p03262 (python)

Fixed submission:
from fractions import gcd

N, X = map(int, input().split())
x = list(map(int, input().split()))
z = list(map(lambda i: abs(X - i), x))
ans = z[0]
for i in range(1, N):
	ans = gcd(ans, z[i])
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n, X = map(int, input().split())
x = list(map(int, input().split()))
ans = abs(x[0]-X)
for el in x[1:]:
    ans = math.gcd(ans, abs(el - X))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n, X = map(int, input().split())
x = list(map(int, input().split()))
ans = abs(x[0]-X)
for el in x[1:]:
    ans = math.gcd(ans, abs(el - X))
print(ans)
Problem p03361 (python)

Fixed submission:
H, W = map(int, input().split())
s = ["."*(W+2)]
for i in range(H):
    temp = "."
    temp += input()
    temp += "."
    s.append(temp)
s.append("."*(W+2))
flag = True
for i in range(1, H+1):
    for j in range(1, W+1):
        if s[i][j] == "#" and s[i-1][j] == "." and s[i+1][j] == "." and s[i][j-1] == "." and s[i][j+1] == ".":
            flag = False
            break
    if not flag:
        break
if flag:
    result = "Yes"
else:
    result = "No"
print(result)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
s = [["."]*W]
for i in range(H):
    temp = "."
    temp += input()
    temp += "."
    s.append(temp)
s.append(["."]*W)
flag = True
for i in range(1, H+1):
    for j in range(1, W+1):
        if s[i][j] == "#" and s[i-1][j] == "." and s[i+1][j] == "." and s[i][j-1] == "." and s[i][j+1] == ".":
            flag = False
            break
    if not flag:
        break
if flag:
    result = "Yes"
else:
    result = "No"
print(result)
Problem p03479 (python)

Fixed submission:
x, y = map(int, input().split())
count = 1
while x <= y:
    x *= 2
    count += 1
print(count-1)

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
count = 1
while x <= y:
    x *= 2
    count += 1
print(count-1
Problem p03633 (python)

Fixed submission:
from fractions import gcd
n = int(input())
T = [int(input()) for i in range(n)]
ans = 1
for t in T:
    ans = ans*t//gcd(ans,t)
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
n = int(input())
T = [int(input()) for i in range(n)]
ans = 1
for t in T:
    ans = int(ans*t/gcd(ans,t))
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
n = int(input())
T = [int(input()) for i in range(n)]
ans = 1
for t in T:
    ans = ans*t//gcd(ans,t)
print(ans)