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

Fixed submission:
def main(N,Y):
    # type: (int, int) -> None
    """
    次の方程式
        x + y + z = N
        10x + 5y + z = Y
    の解を探索する．zを消去すると
        9x + 4y = Y - N
      where
        x >= 0
        y >= 0
        x + y <= N
    w = 2x+y と置くと
        x + 4w = Y - N
      where
        x >= 0
        w >= 0
        w - x <= N
    xを消去すると条件は
        w  >= 0
        4w <= Y - N
        5w <= Y
        9w >= 2(Y - N)
    であり
        x = Y - N - 4w
        y = w - 2x
        z = N - x - y
    wを適当にboundした後は x>=0 and y>=0 and z >= 0 でfilteringするのが安心だが
    練習のために w のみでfilteringしてみる
    """
    Y = Y // 1000
    lb = (2*(Y-N)-1) // 9 + 1
    ub = min ((Y-N) // 4, Y // 5)
    ans = [ (x,y,z) for w in range(lb,ub+1) for x in [Y-N-4*w] for y in [w - 2*x] for z in [N - x - y] ]
    if ans == []:
        print("-1 -1 -1")
    else:
        x,y,z = ans[0]
        print("{0} {1} {2}".format(x,y,z))
    return

if __name__ == '__main__':
    N, Y, *_ = map(int, input().split())
    main(N,Y)

Buggy submission (verdict: Runtime Error):
from typing import *

def main(N,Y):
    # type: (int, int) -> None
    """
    次の方程式
        x + y + z = N
        10x + 5y + z = Y
    の解を探索する．zを消去すると
        9x + 4y = Y - N
      where
        x >= 0
        y >= 0
        x + y <= N
    w = 2x+y と置くと
        x + 4w = Y - N
      where
        x >= 0
        w >= 0
        w - x <= Y
    xを消去すると条件は
        w  >= 0
        4w <= Y - N
        9w >= 2(Y - N)
    であり
        x = Y - N - 4w
        y = w - 2x
        z = N - x - y
    """
    Y = Y // 1000
    lb = (2*(Y-N)-1) // 9 + 1
    ub = (Y-N) // 4
    ans = None
    for w in range(lb,ub+1):
        x = Y - N - 4*w
        y = w - 2*x
        z = N - x - y
        assert(x >= 0 and y >= 0 and z >= 0)
        ans = (x,y,z)
        break
    if ans is not None:
        print("{0} {1} {2}".format(x,y,z))
    else:
        print("{0} {1} {2}".format(-1,-1,-1))
    return

if __name__ == '__main__':
    N, Y, *_ = map(int, input().split())
    main(N,Y)

Buggy submission (verdict: Runtime Error):
def main(N,Y):
    # type: (int, int) -> None
    """
    次の方程式
        x + y + z = N
        10x + 5y + z = Y
    の解を探索する．zを消去すると
        9x + 4y = Y - N
      where
        x >= 0
        y >= 0
        x + y <= N
    w = 2x+y と置くと
        x + 4w = Y - N
      where
        x >= 0
        w >= 0
        w - x <= Y
    xを消去すると条件は
        w  >= 0
        4w <= Y - N
        9w >= 2(Y - N)
    であり
        x = Y - N - 4w
        y = w - 2x
        z = N - x - y
    """
    Y = Y // 1000
    lb = 2*(Y-N) // 9
    ub = (Y-N-1) // 4 + 1
    ans = None
    for w in range(lb,ub):
        x = Y - N - 4*w
        y = w - 2*x
        z = N - x - y
        assert(x >= 0 and y >= 0 and z >= 0)
        ans = (x,y,z)
        break
    if ans is not None:
        print("{0} {1} {2}".format(x,y,z))
    else:
        print("{0} {1} {2}".format(-1,-1,-1))
    return

if __name__ == '__main__':
    N, Y, *_ = map(int, input().split())
    main(N,Y)
Problem p03494 (python)

Fixed submission:
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[Iterable[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    print(cnt)
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(int, input().split()))
    main(n, xs)

Buggy submission (verdict: Runtime Error):
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[List[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(lambda _: int(input()), range(n)))
    main(n, xs)
Problem p03813 (python)

Fixed submission:
X= int(input())
if X<1200:
    print("ABC")
else :
    print("ARC")

Buggy submission (verdict: Runtime Error):
X= (int(x) for x in input().split())
if X>1200:
    print("ARC")
else :
    print("ABC")
Problem p03219 (python)

Fixed submission:
s=input().split()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(int(a))

Buggy submission (verdict: Runtime Error):
s=input().sprit()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(a)

Buggy submission (verdict: Runtime Error):
x=input('X')
y=input('Y')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)

Buggy submission (verdict: Runtime Error):
x=input('AからBの運賃')
y=input('BからCの運賃')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())

if a*b%2 == 0:
  print("Even")
else:
  print("Odd")

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

if a*b%2 == 0:
  puts("Even")
else:
  puts("Odd")
Problem p03609 (python)

Fixed submission:
x,t = map(int,input().split())
if x-t > 0:
    print(x-t)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
if x-t > 0:
    print(x-t)
else:
    print(0)
Problem p04043 (python)

Fixed submission:
n = list(map(int, input().split()))
count_5 = 2
count_7 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = list(map(int, input().split()))
count_5 = 2
count_5 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n = list(map(int, input().split()))
5count = 2
7count = 1
for i in range(len(n)):
    if n[i] == 5:
        5count -= 1
    elif n[i] == 7:
        7count -= 1
if 5count==0 and 7count==0:
    print('YES')
else:
    print('NO')
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,B=map(int,input().split())
if A<=8:
  print(Yay!)
if B<=8:
  print(:()
Problem p03239 (python)

Fixed submission:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(c))

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(ct2))

Buggy submission (verdict: Runtime Error):
import copy
N, T = map(int, input().split())
ct = {}
for _ in range(N):
  ci, ti = map(int, input().split())
  ct[ci] = ti
  
count = 0
ct2 = copy.deepcopy(ct)
for ci, ti in ct.items():
  if ti > T:
    count += 1
    del ct2[ci]

if count == N:
  print("TLE")
else:
  print(min(ct2.keys()))

Buggy submission (verdict: Runtime Error):
import copy
N, T = map(int, input().split())
ct = {}
for _ in range(N):
  ci, ti = map(int, input().split())
  ct[ci] = ti
  
count = 0
ct2 = copy.deepcopy(ct)
for ci, ti in ct.items():
  if ti > T:
    count += 1
    del ct2[ci]

if count == N:
  print("TLE")
  exit()

print(min(ct2.keys()))
Problem p03605 (python)

Fixed submission:
def main():
  x = input()

  if x[0] == '9':
    print('Yes')
    return
  if x[1] == '9':
    print('Yes')
    return
  print('No')
  return

if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):
def main():
  x, a = map(int, input().split())

  if (x-a) <= 0:
    print(0)
    return
  print(x-a)
  return

if __name__ == '__main__':
  main()
Problem p03401 (python)

Fixed submission:
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split())) + [0]

L = 0
for i in range(N+1):
    L += abs(A[i+1] - A[i])
    
for i in range(1,N+1):
    print(L - (abs(A[i] - A[i-1]) + abs(A[i+1] - A[i])) + abs(A[i+1] - A[i-1]))

Buggy submission (verdict: Runtime Error):
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split()))
A = A.append(0)

L = [0]
for i in range(N):
    L.append(L[-1] + abs(A[i+1] - A[i]))

L.append(L[-1] + abs(A[-2] - A[0]))

for i in range(N):
    print(L[i] + (L[-1] - L[i+2]) + abs(A[i] - A[i+2]))
Problem p03447 (python)

Fixed submission:
a = int(input())   
b = int(input())   
c = int(input())   
                   
print((a-b)%c)

Buggy submission (verdict: Runtime Error):
import sys                                                   
l1 = list(map(int, input().split()))                         
N = l1[0]                                                    
M = l1[1]                                                    
                                                             
dat = []                                                     
                                                             
per_dis = [ [] for n in range(N+1)]                          
                                                             
for n in range(M):                                           
    x = list(map(int, input().split()))                      
    dat.append(x)                                            
                                                             
def bfs(start, goal):                                        
    visited = []                                             
    unvisited = [(start, 0)]                                 
    while unvisited:                                         
        now = unvisited[0]                                   
        unvisited = unvisited[1:]                            
        for next in per_dis[now[0]]:                         
            if next[0] not in visited:                       
                if next[0] == goal:                          
                    return now[1] + next[1]                  
                unvisited.append((next[0], now[1] + next[1]))
                visited.append(next[0])                      
    return None                                              
                                                             
for x in dat:                                                
    tmp = bfs(x[0], x[1])                                    
    if None == tmp:                                          
        per_dis[x[0]].append((x[1],x[2]))                    
        per_dis[x[1]].append((x[0],-x[2]))                   
    elif  x[2] != tmp:                                       
        print("No")                                          
        break;                                               
else:                                                        
    print("Yes")
Problem p03210 (python)

Fixed submission:
X = int(input())

if X == 3 or X == 5 or X == 7:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
X = int(input())

if X = 3:
  print('YES')
elif X = 5:
  print('YES')
elif X = 7:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
X = int(input())

if X = 3 or X = 5 or X = 7:
  print('YES')
else:
  print('NO')
Problem p03211 (python)

Fixed submission:
S = input()
B = 999
for i in range(len(S)-2):
    A = abs(753 - int(S[i:i+3]))
    B = min(A, B)
print(B)

Buggy submission (verdict: Runtime Error):
S = input()
ans = 0

for i in range(len(S) - 2):
    A = abs(753 - int(S[i:i+3]))
    ans = min(A, ans)

print(B)
Problem p03219 (python)

Fixed submission:
x,y = tuple(map(int,input().split()))

answer = int(x) + int(y)/2

print(int(answer))

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())

print(x + y/2)

Buggy submission (verdict: Runtime Error):
x = int(input(x?\n))
y = int(input(y?\n))

print(x + y/2)
Problem p03211 (python)

Fixed submission:
# B

s = input()

min = 999
i = 0
while i + 3 <= len(s):
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = -n
    if min > n:
        min = n
    i = i + 1

print(min)

Buggy submission (verdict: Runtime Error):
# B

s = input() # 1行読み込む（文字列）

min = 999
i = 0
while i + 3 < s.length:
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = n - 1
    if min > n:
        min = n
    i = i + 1

print(min)

Buggy submission (verdict: Runtime Error):
# B

s = input() # 1行読み込む（文字列）

min = 999
i = 0
while i + 3 < s.length:
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = n - 1
    if min > n:
        min = n

print(min)
Problem p03210 (python)

Fixed submission:
takahashi_kun = int(input())

if takahashi_kun == 3:
    print('YES')
elif takahashi_kun == 5:
    print('YES')
elif takahashi_kun == 7:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
takahashi_kun = X

if X == 3:
    print('YES')
elif X == 5:
    print('YES')
elif X == 7:
    print('YES')
else:
    print('NO')
Problem p03448 (python)

Fixed submission:
s = []
for i in range(4):
    s.append(int(input()))

count = 0
for a in range(s[0] + 1):
    for b in range(s[1] + 1):
        for c in range(s[2] + 1):
            if( a*500 + b*100 + c*50 == s[3] ):
                count = count + 1

print(count)

Buggy submission (verdict: Runtime Error):
A, B, C, x = map(int, [input() for i in range(4)])
ans = [ _ for a in range(A+1) for b in range(B+1) for c in range(C+1) if a*500 + b*100+ c*50 == x ]
print(len(ans))

Buggy submission (verdict: Runtime Error):
s = []
for i in range(4):
    s.append(int(input()))

count = 0
for a in range(s[0] + 1):
    for b in range(s[1] + 1):
        for c in range(s[2] + 1):
            if( a*500 + b*100 + c*50 == s[3] ):
                count = count + 1

print(ans)
Problem p03227 (python)

Fixed submission:
a=input()
if len(a)==2:
    print(a)
else:
    print(a[::-1])

Buggy submission (verdict: Runtime Error):
    a=input()
    if len(a)==2:
        print(a)
    else:
        print(a[::-1])
Problem p03210 (python)

Fixed submission:
a = int(input())
if a==3 or a==5 or a==7:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
s = input()
nlen = len(s)
a = min([abs(int(s[i:i+3])-753) for i in range(nlen-2+1)])
print(a)

Buggy submission (verdict: Runtime Error):
a = int(input())
if a==3 or a==5 or a==7:
	print("YES")
else:
	print("NO")
return
Problem p03399 (python)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())
sum = 0

if A > B:
	sum += B
else:
	sum += A
if C > D:
	sum += D
else :
	sum += C
	
print(sum)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
sum = 0

if A > B:
	sum += B
elif :
	sum += A
if C > D:
	sum += D
elif :
	sum += C
	
print(sum)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = 0

if A > B:
	E += B
elif :
	E += A
if C > D:
	E += D
elif :
	E += C
	
print(E)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = 0

if A > B:
	E += B
elif :
	E += A
	if C > D:
		E += D
	elif :
		E += C
print(E)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = 0

if A > B and C > D:
	E += B + D
print(E)
elif A > B and C < D:
	E += B + C
print(E)
elif A < B and C > D:
	E += A + D
print(E)
elif A < B and C < D:
	E += A + C
print(E)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = E

if A > B and C > D:
	E = B + D
elif A > B and C < D:
	E = B + C
elif A < B and C > D:
	E = A + D
elif A < B and C < D:
	E = A + C
	
print(E)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A > B and C > D:
	E = B + D
elif A > B and C < D:
	E = B + C
elif A < B and C > D:
	E = A + D
elif A < B and C < D:
	E = A + C
	
print(E)
Problem p03635 (python)

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

print((n-1) * (m-1))

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

print((n-1) * (m-1))
Problem p03210 (python)

Fixed submission:
x = int(input())
if x ==3 or x== 5 or x == 7:
  print("YES")
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
x = int(input())
if x =3 or x= 5 or x = 7:
  print("YES")
else:
  print('NO')
Problem p03210 (python)

Fixed submission:
x = int(input())
if x in (7, 5, 3):
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
x:int = input()
if x in (7, 5, 3):
    print('YES')
else:
    print('NO')
Problem p03477 (python)

Fixed submission:
a, b, c, d = map(int, input().split())
if a+b > c+d:
    print("Left")
elif a+b < c+d:
    print("Right")
else:
   print("Balanced")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int(), input().split())
if a+b > c+d:
    print("left")
elif a+b < c+d:
    print("right")
else:
   print("balanced")
Problem p03485 (python)

Fixed submission:
import math
a, b = map(float, input().split())
print(int(math.ceil((a+b)/2)))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
listS = list(s)
listT = list(t)
sorted(listS)
sorted(listT)
if listS > listT:
    print("Yes")
else:
    print("No")
Problem p03486 (python)

Fixed submission:
s = input()
t = input()
listS = list(s)
listT = list(t)
listS.sort()
listT.sort(reverse = True)
if listS < listT:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s, t = map(str, input().split())
listS = list(s)
listT = list(t)
sorted(listS)
sorted(listT)
if listS > listT:
    print("Yes")
else:
    print("No")
Problem p03487 (python)

Fixed submission:
N = int(input())
list = [int(a) for a in input().split()]
dict = dict()
for i in range(N):
    if list[i] in dict:
        dict[list[i]] += 1
    else:
        dict[list[i]] = 1
count = 0
for i, j in dict.items():
#    print(i, j) 
    if i <= j:
        count += j - i
    else:
        count += j
              
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
list = [int(a) for a in input().split()]
count = 0
for i in range(len(list)):
    if list[i] != list.count(list[i]):
        list.remove(list[i])
        count += 1
    if i == len(list)-1:
        break
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
list = [a for a in input().split()]
count = 0
A = len(list)
for i in range(A):
#    print(list[i])
 #   print(list.count(list[i]))
    if list[i] != list.count(list[i]):
        list.remove(list[i])
        count += 1
    if i == len(list)-1:
        break
 #   print(list)
 #   print(count)
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
list = [a for a in input().split()]
count = 0
for i in range(len(list)):
#    print(list[i])
 #   print(list.count(list[i]))
    if list[i] != list.count(list[i]):
        list.remove(list[i])
        count += 1
    if i == len(list)-1:
        break
 #   print(list)
 #   print(count)
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
list = [a for a in input().split()]
count = 0
for i in range(len(list)):
    if not list[i] == list.count(i):
        list.remove(list[i])
        count += 1
    if i == len(list)-1:
        break
print(count)
Problem p03501 (python)

Fixed submission:
N, A, B = map(int, input().split())
print(N*A if N*A < B else B)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
print(N*A if N*A < B else B)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
print N*A if N*A < B else B

Buggy submission (verdict: Runtime Error):
N, A, B = map(raw_input().split())
print N*A if N*A < B else B

Buggy submission (verdict: Runtime Error):
N, A, B = map(input().split())
print(N*A if N*A < B else B)

Buggy submission (verdict: Runtime Error):
N, A, B = map(input().split())
print N*A if N*A < B else B
Problem p03502 (python)

Fixed submission:
N = str(input())
A = 0
for i in N:
    A += int(i)
print("Yes" if int(N)%A == 0 else "No")

Buggy submission (verdict: Runtime Error):
N = str(input())
A = 0
for i in N:
    A += int(i)
return "Yes" if N%A == 0 else "No"
Problem p03548 (python)

Fixed submission:
X, Y, Z = map(int, raw_input().split())
print((X-Z)/(Y+Z))

Buggy submission (verdict: Runtime Error):
X, Y, Z = map(int, input().split())
print((X-Z)/Y)

Buggy submission (verdict: Runtime Error):
X = input(); Y = input(); Z = input()
print((X-Z)/Y)
Problem p03563 (python)

Fixed submission:
R = input()
G = input()
print(2*G - R)

Buggy submission (verdict: Runtime Error):
R = raw_input()
G = raw_input()
print(2*G - R)
Problem p03564 (python)

Fixed submission:
X = 1
N = input()
K = input()
for i in range(N):
	if(X*2 < X+K):
	    X *= 2
	else:
            X += K
print(X)

Buggy submission (verdict: Runtime Error):
X = 1
N = input()
K = input()
for i in range(N):
	if(X*2 < X+K):
		X *= 2
	else X += K
print(X)
Problem p03210 (python)

Fixed submission:
x = int(input())

if x == 3 or x == 5 or x == 7:
    print ("YES")

else:
    print ("NO")

Buggy submission (verdict: Runtime Error):


x = int(input())

if x == 3 or x == 5 or x == 7:
    print "YES"

else:
    print "NO"

Buggy submission (verdict: Runtime Error):


x = int(input('高橋くんは何歳ですか？'))

if x == 3:
    print "YES"

elif x == 5:
    print "YES"

elif x == 7:
    print "YES"

else:
    print "NO"

Buggy submission (verdict: Runtime Error):


num = x

x = int(input('高橋くんは何歳ですか？'))

if x = 3:
    print "YES"

elif x = 5:
    print "YES"

elif x = 7:
    print "YES"

else:
    print "NO"
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
 n= int(input())
 if n == 1:
        print("Hello World")
 else:
        a = int(input())+int(input())
        print(a)

Buggy submission (verdict: Runtime Error):
n = int(input())
b = int(input())
c = int(input())
if n == 1:
    ("Hello World")
else:
    a = b + c
    print(a)
Problem p03493 (python)

Fixed submission:
s = input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s = int(input())
print(s.count(1))
Problem p03494 (python)

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

j = 0
new = []
while True:
    for m,i in enumerate(l):
        if i % 2 == 0:
            l[m] = i/2
            
            if m+1 == n:
                j +=1
        else:
            print(j)
            break
    else:
        continue
    break

Buggy submission (verdict: Runtime Error):
n = int(input())
l = [list(map(int,input().split()))]
j = 0
new = []
while True:
    for m,i in enumerate(l):
        if i % 2 == 0:
            l[i] = i/2
            if m == n:
                j +=1
        else:
            print(j)
            exit()
Problem p03547 (python)

Fixed submission:
x,y = map(str,input().split())

x = int(x,16)
y = int(y,16)

if x<y:
    print("<")
elif x == y:
    print("=")
else:
    print(">")

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())

x = int(x,16)
y = int(y,16)

if x<y:
    print("<")
elif x == y:
    print("=")
else:
    ptiny(">")

Buggy submission (verdict: Runtime Error):
x,y = map(str,input().split())

x = int(x,16)
y = int(y,16)

if x<y:
    print("<")
elif x == y:
    print("=")
eldr:
    ptiny(">")
Problem p03210 (python)

Fixed submission:
q = input()

if q == '7' or  q == '5' or q == '3':
	print('YES')
else:
	print('NO')

Buggy submission (verdict: Runtime Error):
q = input()
x=100000
for i in range(len(q) - 2):
	y = abs(int(q[i:i+3]) - 753)
	if x > y :
		x = y
		
print(y)

Buggy submission (verdict: Runtime Error):
q = input()
x=100000
for i in range(len(q) - 2):
	y = abs(int(q[i:i+3]) - 753)
	if x > y :
		x = y
		
print(y)
Problem p03211 (python)

Fixed submission:
s = input()
slen = len(s)

minRes = 10**6

for idx in range(2, slen):
	b = idx-2
	
	n = int(s[b:idx+1])
	
	tempRes = abs(n-753)
	
	minRes = min(tempRes, minRes)

print(minRes)

Buggy submission (verdict: Runtime Error):

s = input()
slen = len(s)

minRes = 10**6

for idx in range(2, slen):
	b = idx-2
	
	n = int(s[b:idx+1])
	
	tempRes = abs(n-753)
	
	minRes = min(tempRes, minRes)

print(minRes)