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

Fixed submission:
N, X = map(int, input().split())
li = list(map(int, input().split()))
D = [0]*(N+1)
flag = "0"
for i in range(N):
    D[i+1] = D[i] + li[i]
    if D[i+1] > X:
        flag = "1"
        break
if flag == "1":
    print(i + 1)
else:
    print(N + 1)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
li = list(map(int, input().split()))
i = 0
D = 0
while D <= X:
    if i > N + 1:
        break
    D += li[i]
    i += 1

if i > N + 1:
    print(N+1)
else:
    print(i)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
li = list(map(int, input().split()))
i = 0
D = 0
while D <= X:
    D += li[i]
    i += 1
    if i > N + 1:
        break
if i > N + 1:
    print(N+1)
else:
    print(i)
Problem p03076 (python)

Fixed submission:
import sys
input = sys.stdin.readline
li = [[0]*2 for _ in range(5)]
count = 0
total = 0
for i in range(5):
    li[i][0] = int(input())
    li[i][1] = li[i][0]%10
    if li[i][1] == 0:
        count += 1
li.sort(key=lambda x:x[1])
for i in range(count):
    total += li[0][0]
    li = li[1:]
if count != 5:
    for i in range(5-count-1):
        total += (li[-1][0]+10-li[-1][1])
        li = li[:-1]
    print(total+li[0][0])
else:
    print(total)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
li = [[0]*2 for _ in range(5)]
count = 0
total = 0
for i in range(5):
    li[i][0] = int(input())
    li[i][1] = li[i][0]%10
    if li[i][1] == 0:
        count += 1
li.sort(key=lambda x:x[1])
for i in range(count):
    total += li[0][0]
    li = li[1:]
for i in range(5-count-1):
    total += (li[-1][0]+10-li[-1][1])
    li = li[:-1]
print(total+li[0][0])
Problem p03087 (python)

Fixed submission:
import sys
input = sys.stdin.readline
N, Q = map(int,input().split())
S = list(input())[:-1]
list_Sum = [0]*(N+1)
for i in range(1, N):
    list_Sum[i+1] = list_Sum[i]
    if S[i-1] == "A" and S[i] == "C":
        list_Sum[i+1] += 1
for i in range(Q):
    l, r = map(int,input().split())
    print(list_Sum[r]-list_Sum[l])

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
for i in range(q):
    tmp = s
    list_q = list(map(int, input().split()))
    tmp = tmp[list_q[0] -1:list_q[1]]
    print(tmp)
    tmp = tmp.split("AC")
    print(len(tmp) - 1)

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
for i in range(q):
    list_q = list(map(int, input().split()))
    list_q[0] = list_q[0] - 1
    list_q[1] = n - list_q[1]
    min_num = min(list_q)
    for j in range(min_num):
        s = s[1:]
        s = s[:-1]
    for k in range(list_q[0] - min_num):
        s = s[1:]
    for k in range(list_q[1] - min_num):
        s = s[:-1]
    s = s.split("AC")
    print(len(s) - 1)

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
for i in range(q):
    list_q = list(map(int, input().split()))
    list_q[1] = n - list_q[1]
    for i in range(list_q[0] - 1):
        s = s[1:]
    for i in range(list_q[1]):
        s = s[:-1]
    s = s.split("AC")
    print(len(s) - 1)
Problem p03110 (python)

Fixed submission:
size = input()
sum = 0
for i in range(int(size)):
    x,u = input().split()
    x = float(x)
    if(u == "BTC"):
        x *= 380000
    sum += x
print(sum)

Buggy submission (verdict: Runtime Error):
size = input()
sum = 0
for i in range(int(size)):
    x = input()
    x = float(x)
    u = input()
    if(u == "BTC"):
        x *= 380000
    sum += x
print(sum)
Problem p03136 (python)

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
li_L = list(map(int, input().split()))
a = max(li_L)
li_L.remove(a)
if a < sum(li_L):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N = int(input())
li_L = map(int, input().split())
a = max(li_L)
li_L = li_L.remove(a)
if a < sum(li_L):
    print("Yes")
else:
    print("No")
Problem p03273 (python)

Fixed submission:
import sys
import numpy as np
input = sys.stdin.readline
H, W = map(int, input().split())
a = [list(input().strip()) for _ in range(H)]
a = [ai for ai in a if "#" in ai]
H = len(a)
a_T = np.array(a).T
a_T = [ai for ai in a_T if "#" in ai]
a = np.array(a_T).T
W = len(a[0])
for i in range(H):
    for j in range(W):
        print(a[i][j],end="")
    print("")

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np
input = sys.stdin.readline
H, W = map(int, input().split())
a = [list(input().strip()) for _ in range(H)]
a = [ai for ai in a if "#" in ai]
H = len(a)
a_T = np.array(a).T
a_T = [ai for ai in a_T if "#" in ai]
a = np.array(a_T).T
W = len(a[0])
for i in range(H):
    for j in range(W):
        print(a[i][j],end="")
    print("")
Problem p03281 (python)

Fixed submission:
def divisor(n):
    i = 1
    ans_div = []
    while i * i <= n:
        if n%i == 0:
            ans_div.append(i)
            ans_div.append(n // i)
        i += 1
    ans_div = list(set(ans_div))
    return ans_div
import sys
input = sys.stdin.readline
N = int(input())
count = 0
if N < 105:
    print(0)
else:
    for odd in range(105, N+1, 2):
        li = divisor(odd)
        if len(li) == 8:
            count += 1
    print(count)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N = int(input())
count = 0
if N < 105:
    print(0)
else:
    for odd in range(105, N+1, 2):
        li = divisor(odd)
        if len(li) == 8:
            count += 1
    print(count)
Problem p03351 (python)

Fixed submission:
import sys
input = sys.stdin.readline
a, b, c, d = map(int, input().split())
ab = abs(a-b)
bc = abs(b-c)
ac = abs(a-c)
if (ab <= d and bc <= d) or ac <= d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
A, B = map(int, input().split())
li = [A+B, A-B, A*B]
print(max(li))
Problem p03469 (python)

Fixed submission:
import sys
input = sys.stdin.readline
S = list(input().strip())
S[3] = "8"
ans = ""
for s in S:
    ans += s
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
S = input().strip()
S[3] = "8"
print(S)
Problem p03543 (python)

Fixed submission:
import sys
input = sys.stdin.readline
N = list(map(int, list(input().strip())))
if sum(N[:3])%3 == 0 or sum(N[1:])%3 == 0:
    if sum(N[:3])//3 == N[0] or sum(N[1:])//3 == N[-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
input = sys.stdin.readline
N = input()
tmp = N[0]
count = 0
for n in N:
    if tmp == n:
        count += 1
        if count == 3:
            break
    else:
        count = 0
        tmp = n
if count == 3:
    print("Yes")
else:
    print("No")
Problem p03455 (python)

Fixed submission:
import sys
 
i = input().split()

if ((int(i[0])*int(i[1]))%2)==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
import numpy
import sys

args = sys.argv

if ((args[1]*args[2])//2)==0:
  print('Even')
else:
  print('Odd')
Problem p02911 (python)

Fixed submission:
n , k , q = map(int, input().split())
points = [k] * n


for i in range(q):
    x = int(input())
    points[x-1] += 1
for x in points:
    x -= q
    if x <= 0:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
n , k , q = map(int, input().split())
points = [k] * n
for i in range(q):
    x = int(input())
    points[x] += 1
for x in points:
    x -= q
    if x <= 0:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
n , k , q = map(int, input().split())
points = [k] * n
#print(points)
for i in range(q):
    x = int(input())
    points[x] += 1
for x in points:
    x -= q
    if x <= 0:
        print("No")
    else:
        print("Yes")
Problem p02885 (python)

Fixed submission:
A,B = map(int, input().split())
print("%d" % (A-2*B if A >= 2*B else 0))

Buggy submission (verdict: Runtime Error):
input(); d_list = list(map(int, input().split()))
sum=0
for i, x in enumerate(d_list):
  for y in d_list[i+1:]:
    sum+=x*y
print("%d" % sum)
Problem p03455 (python)

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

def evenodd(a,b):
  if a*b%2==1:
    return "Odd"
  else:
    return"Even"
    
print(evenodd(a,b))

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
def evenodd(a,b):
  if a*b%2==1:
    print("Odd")
  else:
    print("Even")
    
print(evenodd(a,b))

Buggy submission (verdict: Runtime Error):
def evenodd(a,b):
  if a*b%2==1:
    print("Odd")
  else:
    print("Even")
    
print(evenodd(a,b))
Problem p02934 (python)

Fixed submission:
N = int(input())

A = map(int,input().split())

print(1/sum(1/x for x in A))

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

A = map(int,input().split())

print(sum 1/x for x in A)
Problem p02772 (python)

Fixed submission:
n=input()
a=list(map(int,input().split()))
for x in a:
    if x%2 == 1:
        continue
    if x%3==0 or x%5 == 0:
        continue
    else:
        print('DENIED')
        break
else:
    print('APPROVED')

Buggy submission (verdict: Runtime Error):
x=list(map(int, input().split()))
false=0

for i in range(1,x[0]+1):
    if x[i]%2 == 0:
        if x[i]%3 != 0 and x[i]%5 != 0:
            false=false+1
if false==0:
	print('APPROVED')
else:
	print('DENIED')

Buggy submission (verdict: Runtime Error):
x=list(map(int, input().split()))
false=0

for i in range(1,x[0]):
    if x[i]%2 == 0:
        if x[i]%3 != 0 or x[i]%5 != 0:
            false=false+1
if false!=1:
	print('APPROVED')
else:
	print('DENIED')

Buggy submission (verdict: Runtime Error):
x=list(map(int, input().split()))
false=0

for i in range(1,len(x)):
	if x[i]%2 ==0:
    	if x[i]%3!=0 or x[i]%5!=0
        	fasle=1
if false==1:
	print('APPROVED')
else:
	print('DENIED')
Problem p02924 (python)

Fixed submission:
import numpy as np
n = int(input())
print(n * (n-1) // 2)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
print(sum(np.arange(n)))

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
print(sum(np.arange(n)))

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
sum(np.arange(n))
Problem p02969 (python)

Fixed submission:
r = int(input())
print(3*r**2)

Buggy submission (verdict: Runtime Error):
# input
N = int(input())
A = []

#list
for i in range(N):
    n = int(input())
    A.append(n)

#max
for i in range(N):
    A_=A[:i]
    A__=A[i+1:]
    print(max(A_+A__))
Problem p02993 (python)

Fixed submission:
S = input()

S1 = S[0]
S2 = S[1]
S3 = S[2]
S4 = S[3]

flg = "Good"

if S1 == S2:
  flg = "Bad"
elif S2 == S3:
  flg = "Bad"
elif S3 == S4:
  flg = "Bad"

print(flg)

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)
def lcm(x,y):
    return x * y // gcd(x,y)
L = lcm(C,D)
b = B - (B // C) - (B // D) + (B // L)
a = (A-1) - ((A-1) // C) - ((A-1) // D) + ((A-1) // L)
print(b - a)

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
#最大公約数
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)
#最小公倍数
def lcm(x,y):
    return x * y // gcd(x,y)
L = lcm(C,D)
b = B - (B // C) - (B // D) + (B // L)
a = (A-1) - ((A-1) // C) - ((A-1) // D) + ((A-1) // L)
print(b - a)

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    if not i % C == 0:
        if not i % D == 0:
            cnt = cnt + 1
print(cnt)
Problem p03087 (python)

Fixed submission:
import numpy as np

N, Q = map(int, input().split())  # 複数数値入力
S = list(input())  # 一文字ずつ格納

dp = [0] * N
i = 0
flg = False
for str in S:
    if str == "C" and flg == True:
        dp[i] = dp[i - 1] + 1
        flg = False
    elif str == "A":
        flg = True
        dp[i] = dp[i-1]
    else:
        flg = False
        dp[i] = dp[i-1]
    i += 1

for i in range(Q):
    l, r = map(int, input().split())  # 複数数値入力
    print(dp[r-1]-dp[l-1])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())  # 複数数値入力
S = list(input())  # 一文字ずつ格納
L = []
R = []

for i in range(Q):
    l, r = map(int, input().split())  # 複数数値入力
    L.append(l)
    R.append(r)

list = []
flg = 0
for s in S:
    if s == "A":
        flg = 1
    elif s == "C" and flg == 1:
        list.append(1)
        list.append(2)
        flg = 0
    elif flg == 1:
        list.append(0)
        list.append(0)
    else:
        list.append(0)

for i in range(Q):
    S = list[L[i]-1:]
    S = S[:R[i] - L[i]+1]
    if S[0] == 2:
        S = S[1:]
    if S[-1] == 1:
        S = S[:-2]
    print(int(sum(S)/3))
Problem p03111 (python)

Fixed submission:
N, A, B, C = map(int, input().split())  # 複数数値入力
L = [0] * N
for i in range(N):
    L[i] = int(input())


def dfs(depth, a, b, c):    # 深さは何本目の竹まで場合分けしたかを示す  a,b,cにはA,B,Cに割り当てられている竹の長さの和が入っている　戻り値はMP
    if depth == N:
        # ABCのどれかが1本も割り当てられていない場合はだめなのでINFを返す
        return abs(a-A)+abs(b-B)+abs(c-C) - 30 if min(a, b, c) > 0 else 1000000000

    ret0 = dfs(depth + 1, a, b, c)  # depth本目の竹を使わない
    # depth本目の竹をAを作るのに使用する    コストを足して、長さには使用する竹の長さを足してやる
    ret1 = dfs(depth + 1, a + L[depth], b, c) + 10
    ret2 = dfs(depth + 1, a, b + L[depth], c) + 10  # depth本目の竹をBを作るのに使用する
    ret3 = dfs(depth + 1, a, b, c + L[depth]) + 10  # depth本目の竹をCを作るのに使用する

    return min(ret0, ret1, ret2, ret3)  # 一番小さいMPを返す


print(dfs(0, 0, 0, 0))

Buggy submission (verdict: Runtime Error):
import math

N, A, B, C = map(int, input().split())  # 複数数値入力
L = [0] * N
for i in range(N):
    L[i] = int(input())


def dfs(depth, a, b, c):    # 深さは何本目の竹まで場合分けしたかを示す  a,b,cにはA,B,Cに割り当てられている竹の長さの和が入っている　戻り値はMP
    if depth == N:
        # ABCのどれかが1本も割り当てられていない場合はだめなのでINFを返す
        return abs(a-A)+abs(b-B)+abs(c-C) - 30 if min(a, b, c) > 0 else math.inf

    ret0 = dfs(depth + 1, a, b, c)  # depth本目の竹を使わない
    # depth本目の竹をAを作るのに使用する    コストを足して、長さには使用する竹の長さを足してやる
    ret1 = dfs(depth + 1, a + L[depth], b, c) + 10
    ret2 = dfs(depth + 1, a, b + L[depth], c) + 10  # depth本目の竹をBを作るのに使用する
    ret3 = dfs(depth + 1, a, b, c + L[depth]) + 10  # depth本目の竹をCを作るのに使用する

    return min(ret0, ret1, ret2, ret3)  # 一番小さいMPを返す


print(dfs(0, 0, 0, 0))

Buggy submission (verdict: Runtime Error):
import math

N, A, B, C = map(int, input().split())  # 複数数値入力
L = [0] * N
for i in range(N):
    L[i] = int(input())


def dfs(depth, a, b, c):    # 深さは何本目の竹まで場合分けしたかを示す  a,b,cにはA,B,Cに割り当てられている竹の長さの和が入っている　戻り値はMP
    if depth == N:
        # ABCのどれかが1本も割り当てられていない場合はだめなのでINFを返す
        return abs(a-A)+abs(b-B)+abs(c-C) - 30 if min(a, b, c) > 0 else math.inf

    ret0 = dfs(depth + 1, a, b, c)  # depth本目の竹を使わない
    # depth本目の竹をAを作るのに使用する    コストを足して、長さには使用する竹の長さを足してやる
    ret1 = dfs(depth + 1, a + L[depth], b, c) + 10
    ret2 = dfs(depth + 1, a, b + L[depth], c) + 10  # depth本目の竹をBを作るのに使用する
    ret3 = dfs(depth + 1, a, b, c + L[depth]) + 10  # depth本目の竹をCを作るのに使用する

    return min(ret0, ret1, ret2, ret3)  # 一番小さいMPを返す


print(dfs(0, 0, 0, 0))
Problem p03211 (python)

Fixed submission:
str = list(input())  # 一文字ずつ格納
ans = 1000

for i in range(len(str) - 2):
    sa = abs(int(str[i]) * 100 + int(str[i+1]) * 10 + int(str[i + 2]) - 753)
    ans = min(ans, sa)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

str = list(input())  # 一文字ずつ格納
ans = math.inf

for i in range(len(str) - 1):
    sa = abs(int(str[i - 1]) * 100 + int(str[i]) * 10 + int(str[i + 1]) - 753)

    ans = min(ans, sa)

print(ans)
Problem p03238 (python)

Fixed submission:
a = int(input())

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

Buggy submission (verdict: Runtime Error):
a = int(input())
if a == 1:
    print("Hello World")
else:
    c, b = map(int, input().split())  # 複数数値入力
    print(c+b)
Problem p02786 (python)

Fixed submission:
HP=int(input())

def Caracal(x):
  if x>1:
    ans=1+Caracal(x//2)*2
  elif x==1:
    ans=1
  return ans

print(Caracal(HP))

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

print(Caracal(HP))

def Caracal(x):
  if x>1:
    ans=1+Caracal(x//2)*2
  elif x==1:
    ans=1
  return ans

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

print(Caracal(HP))

def Caracal(x):
  if x>1:
    ans=1+Caracal(x//2)*2
  elif x==1:
    ans=1
  print(x,ans)
  return ans
Problem p02772 (python)

Fixed submission:
import numpy as np
 
N = int(input())
l = list(map(int,input().split()))
a = np.array(l)
count = 0

for i in range(len(a)):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
            count += 1

if count:
    print("DENIED")
else:
    print("APPROVED")

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

N = int(input())
l = list(map(int,input().split()))
a = np.array(l)
count = 0

for i in range(len(a)):
    if a[i]%2 == 0:
        if a[i]%3 != 0 and a[i]%5 != 0:
          count += 1:
            

if count:
    print("DENIED")
else:
    print("APPROVED")

Buggy submission (verdict: Runtime Error):
N = int(input())
l = list(map(int,input().split()))
a = np.array(l)
count = 0

for i in range(len(a)):
    if a[i]%2 == 0:
        if a[i]%3 == 0 or a[i]%5== 0:
            count += 1

if count:
    print("DENIED")
else:
    print("APPROVED")

Buggy submission (verdict: Runtime Error):
import numpy as np
 
N = int(input())
l = map(int,input().split())
a = np.array(l)
count = 0
 
for i in range(len(a)):
    if a[i]%6 == 0 or a[i]%10 == 0:
        count += 1
    
if count:
    print("APPROVE")
else:
    print("DENIED")

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

N = int(input())
l = map(int,input().split())
a = np.array(l)
count = 0

for i in range(len(a)):
  if a[i]%6 = 0 or a[i]%10 == 0:
    count += 1

if count:
  print("APPROVE")
else:
  print("DENIED")

Buggy submission (verdict: Runtime Error):
N = int(input())
l = map(int,input().split())
a = np.array(l)
count = 0

for i in range(len(a)):
  if a[i]%6 = 0 or a[i]%10 == 0:
    count += 1

if count:
  print("APPROVE")
else:
  print("DENIED")
Problem p02994 (python)

Fixed submission:
N,L=input().split()


ApplesTaste=[]
for i in range(int(N)):
    taste=int(L)+i
    ApplesTaste.append(taste)


hu=0
zero=0
for i in ApplesTaste:
    
    if i is 0:
        zero+=1
    if i < 0:
        hu+=1

#0がある
if zero is 1:
    point=ApplesTaste.index(0)
    del ApplesTaste[point]
    print(sum(ApplesTaste))

#0がなく全部負
elif hu > 0 and zero is 0:
    point=len(ApplesTaste)-1
    
    del ApplesTaste[point]
    print (sum(ApplesTaste))

else:
    del ApplesTaste[0]
    print(sum(ApplesTaste))

Buggy submission (verdict: Runtime Error):
N,L=(map(int,input().split()))

Nazi=[]

for i in range(N+1):
    azi=L+i-1
    Nazi.append(azi)
del Nazi[0]

sum=0
if L>0:
    del Nazi[0]
    print(sum(Nazi))
else:
    for i in Nazi:
       sum+=i
    sum=(sum-Nazi[-1])
    print(sum)
Problem p02969 (python)

Fixed submission:
r = int(input())
print(3*r*r)

Buggy submission (verdict: Runtime Error):
r = int(intput())
print(3*r*r)
Problem p03853 (python)

Fixed submission:
H, M = map(int, input().split())
src_image = [list(input().split()) for i in range(H)]
for i in range(H):
    print(*src_image[i])
    print(*src_image[i])

Buggy submission (verdict: Runtime Error):
H, M = map(int, input().split())
src_image = [list(input().split() for i in range(H))]
for i in range(H):
    print(*src_image[i])
    print(*src_image[i])
Problem p04044 (python)

Fixed submission:
n, l = (int(x) for x in input().split())
s_list = []
s = ''
for i in range(n):
  s_list.append(input())
for i in range(n):
  s += s_list.pop(s_list.index(min(x for x in s_list)))
print(s)

Buggy submission (verdict: Runtime Error):
n, l = (int(x) for x in input().split())
s_list = []
s = ''
for i in range(n):
  s_list.append(input())
for i in range(l):
  s += s_list.pop(s_list.index(min(x for x in s_list)))
print(s)
Problem p04044 (python)

Fixed submission:
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")

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

s=[]
for i in range(n):
    s.append(input())

order=sorted(s)
ans=''.join(order)

print(ans)
Problem p02772 (python)

Fixed submission:
N=int(input())
li=map(int,input().split())
a=0
for k in li:
  if k %2==0:
    if k%3==0 or k%5==0:
      continue
    else:
      a=1
      break
if a==0:
  print('APPROVED')
else:
  print('DENIED')

Buggy submission (verdict: Runtime Error):
N=int(input())
li=map(int,input().split())
for k in li:
  if k %2=0:
    if k%3=0 or k%5=0:
      continue
    else:
      print('APPROVED')
      break
  else:
    continue
  print('DENIED')
Problem p02843 (python)

Fixed submission:
x=int(input())
if x<100:
	print(0)
elif x>=100:
	a=int(str(x)[-2:])
	b=int(str(x)[:-2])
	counter=0
	while a>=5:
		a-=5
		counter+=1
	while a>=4:
		a-=4
		counter+=1
	while a>=3:
		a-=3
		counter+=1
	while a>=2:
		a-=2
		counter+=1
	while a>=1:
		a-=1
		counter+=1
	print(1 if counter<=b else 0)

Buggy submission (verdict: Runtime Error):
x=int(input())
a=int(str(x)[-2:])
b=int(str(x)[:-2])
counter=0
while a>=5:
	a-=5
	counter+=1
while a>=4:
	a-=4
	counter+=1
while a>=3:
	a-=3
	counter+=1
while a>=2:
	a-=2
	counter+=1
while a>=1:
	a-=1
	counter+=1
print(1 if counter<=b else 0)

Buggy submission (verdict: Runtime Error):
x=int(input())
a=int(str(x)[-2:])
b=int(str(x)[:-2])
counter=0
while a>=5:
	a-=5
	counter+=1
while a>=4:
	a-=4
	counter+=1
while a>=3:
	a-=3
	counter+=1
while a>=2:
	a-=2
	counter+=1
while a>=1:
	a-=1
	counter+=1
print(1 if counter<b else 0)
Problem p02952 (python)

Fixed submission:
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
elif Num == 6:
  Ans = 90000 + 900 + 9
print(Ans)

Buggy submission (verdict: Runtime Error):
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
print(Ans)
Problem p02999 (python)

Fixed submission:
x,a=map(int,input().split())
print(0 if x<a else 10)

Buggy submission (verdict: Runtime Error):
x,a=int(input())
print(0 if x<a else 10)
Problem p03273 (python)

Fixed submission:
h,w=map(int,input().split())
a=[""]*h
for i in range(h):
	a[i]=input()

row=[False]*h
col=[False]*w
for i in range(h):
	for j in range(w):
		if a[i][j]=="#":
			row[i]=True
			col[j]=True
			
for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j],end='')
		print()

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=[""]*h
for i in range(h):
	a[i]=input()

row=[False]*h
col=[False]*w
for i in range(h):
	for i in range(w):
		if a[i][j]=="#":
			row[i]=True
			col[j]=True
			
for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j],end='')
				print()
Problem p03433 (python)

Fixed submission:
n=int(input())
a=int(input())
print('Yes' if n%500 <= a else 'No')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
print('Yes' if n%500 =< a else 'No')
Problem p03544 (python)

Fixed submission:
n=int(input())
a,b=2,1
for i in range(2,n+1):
	c=a+b
	a,b=b,c
print(c if n!=1 else 1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a,b=2,1
for i in range(2,n+1):
	c=a+b
	a,b=b,c
print(c)
Problem p03573 (python)

Fixed submission:
a,b,c=map(int,input().split())
print(a if b-c ==0 else b if a-c ==0 else c)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input())
print(a if b-c ==0 else b if a-c ==0 else c)
Problem p03605 (python)

Fixed submission:
n=str(input())
print('Yes' if "9" in n else "No")

Buggy submission (verdict: Runtime Error):
n=str(input())
print('Yes' if 9 in n else "No")
Problem p03697 (python)

Fixed submission:
a,b=map(int,input().split())
print("error" if a+b >= 10 else a+b)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
print("error" if a+b > 10 else a+b)