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

Fixed submission:
n, a , b = map(int, input().split())
counter=0
for i in range(1, n+1):
    sum1 =  sum(int(x) for x in str(i))
    if(a<=sum1<=b):
        counter+=i
print(counter)

Buggy submission (verdict: Runtime Error):
n, a , b = map(int, input().split())
counter=0
for i in range(1, N+1):
    sum =  sum(int(x) for x in str(i))
    if(a<=sum<=b):
        counter+=1
print(counter)
Problem p03493 (python)

Fixed submission:
a = input()
c = 0
if a[0]=='1':
    c=c+1
if a[1]=='1':
    c=c+1
if a[2]=='1':
    c=c+1
print(c)

Buggy submission (verdict: Runtime Error):
import numpy as np
a = np.array([int(x) for x in input().split()])
count = 0
x = 0

while x == 0:
    if np.all(a%2 ==0):
        count+=1
        a = a/2
    else:
        break


print(count)
Problem p03494 (python)

Fixed submission:
N = int(input())
list = [int(x)  for x in input().split()]
ans = float('inf')
for a in list:
    ans = min(ans, len(bin(a))-bin(a).rfind('1')-1 )
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)
Problem p03636 (python)

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

Buggy submission (verdict: Runtime Error):
    s = input()
    l = len(s)
    print(s[0] + str(l - 2) + s[l - 1])
Problem p03644 (python)

Fixed submission:
import math
a = int(input())
print(2**math.floor(math.log(a,2)))

Buggy submission (verdict: Runtime Error):
import math
a = int(input())
print(2**math.floor(math.log2(a)))

Buggy submission (verdict: Runtime Error):
import math
a = int(input())
print(2**math.floor(mat
Problem p03854 (python)

Fixed submission:
S = input()
flag = True
while(flag):
    if(len(S)==0):
        flag = False
    if(S[-5:]=='dream' or S[-5:]=='erase'):
        S=S[:-5]
    elif(S[-6:]=='eraser'):
        S=S[:-6]
    elif(S[-7:]=='dreamer'):
        S=S[:-7]
    else:
        break
if(flag):
    print('NO')
else:
    print('YES')
#反省点

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

while(len(s)!=0):
    if s[-5:] == 'dream' or s[-5:] == 'erase':
        s = s[:-5]
    elif s[-6:]== 'eraser':
        s = s[:-6]
    elif s[-7:]=='dreamer':
        s = s[:-7]
    else:
        print('N0')
        break
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
S = input()
flag = True
while(flag):
    if(len(s)==0):
        flag = False
    if s[-5:] == 'dream' or s[-5:] == 'erase':
        s = s[:-5]
    elif s[-6:]== 'eraser':
        s = s[:-6]
    elif s[-7:0]=='dreamer':
        s = s[:-7]
    else:
        break
if(flag):
    print('NO')
else:
    print('YES')
Problem p02658 (python)

Fixed submission:
n = int(input())
 
aList = list(map(int,input().split()))
 
if 0 in aList:
  print(0)
else:
  result = 1
  for a in aList:
    result = result * a
    if result > 10 ** 18:
      result = -1
      break
  print(result)

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

aList = list(map(int, input().split()))

if 0 in aList:
  print(0)
else:
  for i in range(n):
    if i == 0:
      continue
    result = result * aList[i]
    if result > 10 ** 18:
      result = -1
      break
  print(result)

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

aList = list(map(int, input().split()))

if 0 in aList:
  print(0)
else:
  for i in range(n):
    if i == 0:
      continue
    result = result * aList[i]

  enemy = 10 ** 18

  if result < enemy:
    print(result)
  else:
    print(-1)

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

aList = list(map(int, input().split()))

if 0 aList:
  print(0)
else:
  for i in range(n):
    if i == 0:
      continue
    result = result * aList[i]

  enemy = 10 ** 18

  if result < enemy:
    print(result)
  else:
    print(-1)

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

aList = list(map(int, input().split()))

result = aList[0]

for i + 1 in range(n):
  result = result * aList[i]

enemy = 10 ** 18

if result < enemy:
  print(result)
else:
  print("-1")
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())


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

Buggy submission (verdict: Runtime Error):
a = int(input("aを入力： "))
b = int(input("bを入力： "))


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

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

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = map(int, input().split())

count = 0

mapList = [s1,s2,s3]

for map in mapList:
  if map == 1:
    count += 1

print(count)

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = map(int, input().split())

count = 0

print(str(s1) + str(s2) +str(s3))

mapList = [s1,s2,s3]

for map in mapList:
  if map == 1:
    count += 1

print(count)

Buggy submission (verdict: Runtime Error):
s1,s2,s3 = map(int, input().split())

count = 0

print(s1,s2,s3)

mapList = [s1,s2,s3]

for map in mapList:
  if map == 1:
    count += 1
  pass

print(count)
Problem p03494 (python)

Fixed submission:
n = int(input())
aList = list(map(int, input().split()))
count = 0

while True:
  flag = True
  for i in range(n):
    if aList[i] % 2 != 0:
      flag = False
    aList[i] /= 2
   
  if flag == False:
    break

  count += 1

print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
aList = list(map(int, input().split()))
count = 0

while True:
  flag = True
  for i in range(n):
    if aList[i] % 2 != 0:
      flag = False
    aList[i] /= 2
   
  if flag = False:
    break

  count += 1
Problem p02756 (python)

Fixed submission:
s = input()
q = int(input())
head = []
tail = []
rev=False
for _ in range(q):
  tmp = list(input().split())
  if tmp[0] == '1':
    if rev == False:
      rev = True
    else:
      rev = False
  if tmp[0] == '2':
    if tmp[1] == '1':
      if rev == False:
        head.append(tmp[2])
      if rev == True:
        tail.append(tmp[2])
    if tmp[1] == '2':
      if rev == False:
        tail.append(tmp[2])
      if rev == True:
        head.append(tmp[2])
head = ''.join(map(str,head))
tail = ''.join(map(str,tail))

ans = head[::-1]+s+tail
if rev == True:
  ans = ans[::-1]
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
q = int(input())
head = []
tail = []
rev=False
for _ in range(q):
  tmp = list(input.split())
  if tmp[0] == '1'
  	if rev == False:
      rev == True
    else:
      rev == False
  if tmp[0] == '2':
    if tmp[1] == '1':
      if rev == False:
        head.append(tmp[2])
      if rev == True:
        tail.append(tmp[2])
    if tmp[1] == '2':
      if rev == False:
        tail.append(tmp[2])
      if rev == True:
        head.append(tmp[2])
head = ''.join(map(str,head))
tail = ''.join(map(str,tail))

ans=head[::-1]+s+tail 
if rev==True:
 ans=ans[::-1]
print(ans)
Problem p02658 (python)

Fixed submission:
n = int(input())
numbers = [int(n) for n in input().split()]
res = 1
numbers.sort()
printou = False
for i in numbers:
	if(i == 0):
		print(0)
		printou = True
		break
	res *= i
	if(res > 1000000000000000000):
		print(-1)
		printou = True
		break

if not printou:
	print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
numbers = [int(n) for n in input().split()]
res = 1
numbers.sort()
printou = False
for i in numbers:
	if(i == 0):
		print(0)
		printou = True
		break
	res *= i
	if(res > 1000000000000000000):
		print(-1)
		printou = True
		break

if not printou:
	print(res)
Problem p03323 (python)

Fixed submission:
l = input().split()
a = int(l[0])
b = int(l[1])
if (a>8) or (b>8):
    print(":(")
else:
    print("Yay!")

Buggy submission (verdict: Runtime Error):
start = 0
for l in input():
    if start == 0:
        start += 1
    else:        
        l = list(map(int, input().split()))
        break
count = 0
for i in l:
    while True:
        if i%2 == 0:
            count += 1
            i = i/2
        else:
            break
print(count)

Buggy submission (verdict: Runtime Error):
l = input().split()
a = int(l[0])
b  int(l[1])
if (a>8) or (b>8):
    print(":(")
else:
    print("Yay!")
Problem p03325 (python)

Fixed submission:
import sys

start = 0
for l in sys.stdin:
    if start == 0:
        start += 1
    else:
        list1 = list(map(int, l.split()))
        break
count = 0
for i in list1:
    while True:
        if i%2 == 0:
            count += 1
            i = i/2
        else:
            break
print(count)

Buggy submission (verdict: Runtime Error):
start = 0
for l in input():
    if start == 0:
        start += 1
    else:        
        l = list(map(int, input().split()))
        break
count = 0
print(l)
for i in l:
    while True:
        if i%2 == 0:
            count += 1
            i = i/2
        else:
            break
print(count)
Problem p02681 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
if a<k:
    print(k)
elif a+b>k:
    print(a)
elif a+b+c>k:
    print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
import sys
a,b,c,k=map(int,input().split())
if a+b>c:
    print(a+b)
else:
    print(a-(k-a-b))
Problem p02678 (python)

Fixed submission:
from sys import stdin
from collections import deque
input = stdin.readline


def main():
    n, m = map(int, input().split())

    nexts = [[] for i in range(n)]
    
    for _ in range(m):
        ai, bi = map(int, input().split())
        ai -= 1
        bi -= 1
        nexts[ai].append(bi)
        nexts[bi].append(ai)

    blues = [-1] * n # 1 is in blues
    blues[0] = 0 # 0 is not in blues
    checked = [0] * n

    red_deque = deque([0])

    while len(red_deque) > 0:
        rd = red_deque[0]
        red_deque.popleft()
        if checked[rd] == 0:
            checked[rd] = 1
            for nxt in nexts[rd]:
                if blues[nxt] == -1:
                    blues[nxt] = rd
                    red_deque.append(nxt)

    print("Yes")
    for blue in blues[1:]:
        print(blue + 1)
    

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
from sys import stdin
from collections import deque
input = stdin.readline


def main():
    n, m = map(int, input().split())

    nexts = [[] for i in range(n)]
    
    for _ in range(m):
        ai, bi = map(int, input().split())
        ai -= 1
        bi -= 1
        nexts[ai].append(bi)
        nexts[bi].append(ai)

    blues = [m] * n # 1 is in blues
    blues[0] = 0 # 0 is not in blues
    checked = [0] * n

    red_deque = deque([0])

    while m in blues:
        rd = red_deque[0]
        red_deque.popleft()
        if checked[rd] == 0:
            checked[rd] = 1
            for nxt in nexts[rd]:
                if blues[nxt] == m:
                    blues[nxt] = rd
                    red_deque.append(nxt)

    print("Yes")
    for blue in blues[1:]:
        print(blue + 1)
    

if __name__ == "__main__":
    main()
Problem p02717 (python)

Fixed submission:
a,b,c=(int(x) for x in input().split())

a,b = b,a
a,c = c,a

print(a, b, c)

Buggy submission (verdict: Runtime Error):
m,n = (int(x) for x in input().split())
list = (input().split())
for i in range(len(list)):
  list[i] = int(list[i])
  
la = sorted(list, reverse=True)

sum = 0
for i in range(len(list)):
  sum += int(list[i])
if int(la[n-1])<sum/(4*m):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())

a,b = b,a
a,c = c,a

print(a, b, c)

Buggy submission (verdict: Runtime Error):
n = [0]*3
for i in range(len(n)):
  while n[i]<1 or 100<n[i]:
    n[i] = int(input())

n[0], n[1] = n[1], n[0]
n[0], n[2] = n[2], n[0]

print(n[0], n[1], n[2])

Buggy submission (verdict: Runtime Error):
n = [0]*3
for i in range(len(n)):
  while n[i]<1 or 100<n[i]:
    n[i] = int(input())

n[0], n[1] = n[1], n[0]
n[0], n[2] = n[2], n[0]

print(n[0], n[1], n[2])

Buggy submission (verdict: Runtime Error):
n = [0]*3
for i in range(len(n)):
  n[i] = input()

n[0], n[1] = n[1], n[0]
n[0], n[2] = n[2], n[0]

print(n[0], n[1], n[2])

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()

a, b = b, a
a, c = c, a

print(a, b, c)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()

tmp = a
a = b
b = tmp

tmp = a
a = c
c = tmp

print(a, b, c)

Buggy submission (verdict: Runtime Error):
n = [0]*3
for i in range(len(n)):
  n[i] = input()

tmp = n[0]
n[0] = n[1]
n[1] = tmp

tmp = n[0]
n[0] = n[2]
n[2] = tmp

for i in range(len(n)):
  print(n[i])

Buggy submission (verdict: Runtime Error):
n = [0,0,0]
for i in range(len(n)):
  n[i] = input()
  
tmp = n[0]
n[0] = n[1]
n[1] = tmp

tmp = n[0]
n[0] = n[2]
n[2] = tmp

for i in range(len(n)):
  print(n[i])

Buggy submission (verdict: Runtime Error):
n = [0,0,0]
for i in range(len(n)):
  n[i] = input()
  
tmp = n[0]
n[0] = n[1]
n[1] = tmp

tmp = n[0]
n[0] = n[2]
n[2] = tmp

for i in range(len(n)):
  print(n[i])
Problem p03220 (python)

Fixed submission:
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
 
x = 100000
ans = 0
 
for i in range(N):
    temp = abs(A -(T - H[i]*0.006))
    if abs(A -(T - H[i]*0.006)) < x:
        x = abs(A -(T - H[i]*0.006))
        ans = i
 
print(ans+1)

Buggy submission (verdict: Runtime Error):
input()
T,A = map(int,input().split())
a = list(map(int,input().split()))
min_val = T-A
for i in range(len(a)):
    if abs(T-0.006*a[i]-A) <= min_val:
        min_val = abs(T-0.006*a[i]-A)
        min_num = i
print(min_num+1)

Buggy submission (verdict: Runtime Error):
input()
T,A = map(int,input().split())
a = list(map(int,input().split()))
min_val = T-A
for i in range(len(a)):
    print("min_val={}".format(min_val))
    if abs(T-0.006*a[i]-A) <= min_val:
        min_val = abs(T-0.006*a[i]-A)
        min_num = i
print(min_num+1)

Buggy submission (verdict: Runtime Error):
input()
T,A = map(int,input().split())
a = list(map(int,input().split()))
min_val = T-A
for i in range(len(a)):
    print("min_val={}".format(min_val))
    if abs(T-0.006*a[i]-A) <= min_val:
        min_val = abs(T-0.006*a[i]-A)
        min_num = i
print(min_num+1)
Problem p03369 (python)

Fixed submission:
s = input()
counter = 0
if s[0] == 'o':
  counter += 1
if s[1] == 'o':
  counter += 1
if s[2] == 'o':
  counter += 1
print(int(700+counter*100))

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

Fixed submission:
N = int(input())
A = int(input())
if A >= N%500:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
if A => N%500:
  print("Yes")
else:
  print("No")
Problem p03471 (python)

Fixed submission:
n,y=map(int,input().split())
for i in range(n+1):
     for j in range(n+1-i):
        z_m=y-(10000*i+5000*j)
        z_n=n-(i+j)
        if z_m>=0 and z_m//1000==z_n:
          print(i,j,z_n)
          exit()
print(-1,-1,-1)

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

for i in range(n+1):
     for j in range(n+1-i):
        z_m=y-(10000*i+5000*j)
        z_n=n-(i+j)
          if z_m>=0 and z_m//1000==z_n:
            print(i,j,z_n)
               exit()
print(-1,-1,-1)
Problem p02747 (python)

Fixed submission:
# import re
s = input()
# m = re.fullmatch(hi{1,10},s):
# if m = "None":
#     print("No")
# else:
#     print("Yes")

if s == "hi" or s =="hihi"or s == "hihihi"  or s=="hihihihi" or s== "hihihihihi":
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# import re
s = input()
# m = re.fullmatch(hi{1,10},s):
# if m = "None":
#     print("No")
# else:
#     print("Yes")

if s == "hi" or s =="hihi"or s == "hihihi"  or s=="hihihihi" or s== "hihihihihi:
    print("Yes")
else:
    print("No")
Problem p02748 (python)

Fixed submission:
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
x = [0] * M
y = [0] * M
c = [0] * M
for i in range(M):
    x[i], y[i], c[i] = map(int, input().split())


ans= 0
tmp =0
#割引券を使わない場合
ans = min(a) + min(b)

#割引券を使う場合
for i in range(M):
    if a[x[i]-1] + b[y[i]-1] - c[i] < ans:
        ans = a[x[i]-1] + b[y[i]-1] - c[i]

print(ans)

Buggy submission (verdict: Runtime Error):
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
x = [0] * M
y = [0] * M
c = [0] * M
for i in range(M):
    x[i], y[i], c[i] = map(int, input().split())


ans= 0
tmp =0
#割引券を使わない場合
ans = min(a) + min(b)

#割引券を使う場合
for i in range(M):
    if a[x[i]-1] + b[y[i]-1] - c[i] < ans:
        ans = a[x[i]] + b[y[i]] - c[i]

print(ans)
Problem p02783 (python)

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

if h%a ==0:
    print(h//a)
else:
    print(h//a +1)

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

h.sort(reverse = True)

if k <= len(h):
    for i in range(k):
        h.pop(0)

    print(sum(h))

else:
    print("0")
Problem p02657 (python)

Fixed submission:
A, B = map(int, input().split())
ans = A * B
print(ans)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split)
ans = A * B
print(ans)
Problem p02681 (python)

Fixed submission:
a = [input() for i in range(2)]
# print(a)
# print(T[:-1])

# s_len = len(a[0])
# a[0] = a[0].rstrip('\n')


if a[0] == a[1][:-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = [input() for i in range(3)]
# print(a)
# print(T[:-1])

# s_len = len(a[0])
# a[0] = a[0].rstrip('\n')


if a[0] == a[1][:-1]:
    print("Yes")
else:
    print("No")
Problem p02683 (python)

Fixed submission:
import sys
input = sys.stdin.readline
import itertools

# 解けなかった
# N, M, X = map(int, input().split())
# values_list = []
# for i in range(N):
#     values = list(map(int, input().split()))
#     values_list.append(values)

# ans = 0
# for i in range(1, N+1):
#     for pair in itertools.combinations(values_list, i):
#         this_m_dict = {}
#         this_cost = 0
#         for item in pair:
#             for j in range(1, M+1):
#                 this_m_dict[j] = this_m_dict.get(j, 0) + item[j]
#             this_cost += item[0]
#         for myvalue in this_m_dict.values():
#             if myvalue < X:
#                 break
#         ans = min(this_cost, ans)

N, M, X = map(int, input().split())
A = []
C = []

for i in range(N):
    values = list(map(int, input().split()))
    C.append(values[0])
    A.append(values[1:])

INF = float('INF')
min_cost = INF

def dfs(i, cost, learn):
    if i == N:
        if min(learn) >= X: 
            return cost
        else:
            return INF

    else:
        new_learn = [(x+y) for (x, y) in zip(A[i], learn)]
        cost = min(dfs(i+1, cost, learn), dfs(i+1, cost + C[i], new_learn))
        return cost

min_cost = dfs(0, 0, [0] * M)

if min_cost == INF:
    print(-1)
else:
    print(min_cost)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import itertools

N, M, X = map(int, input().split())
values_list = []
for i in range(N):
    values = list(map(int, input().split()))
    values_list.append(values)


for i in range(1, N+1):
    for pair in itertools.combinations(values_list, i):
        this_m_dict = {}
        this_cost = 0
        for item in pair:
            for j in range(1, M+1):
                this_m_dict[j] = this_m_dict.get(j, 0) + item[j]
            this_cost += item[0]
        for myvalue in this_m_dict.values():
            if myvalue < X:
                break
        ans = min(this_cost, ans)

print(ans)
Problem p03624 (python)

Fixed submission:
S = input()

al_list = [chr(i) for i in range(97, 97+26)]
s_list = []
Flag = True

for al in S:
    s_list.append(al)

if set(s_list) == set(al_list):
    print('None')
else:
    print(min(list(set(al_list) - set(s_list))))

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

al_list = [chr(i) for i in range(97, 97+26)]
s_list = []
Flag = True

for al in S:
    s_list.append(al)

if s_list == al_list:
    print('None')
else:
    print(min(list(set(al_list) - set(s_list))))
Problem p03644 (python)

Fixed submission:
N = int(input())

ans = 1
mac_c = 0
for i in range(2, N+1):
    c_count = 0
    temp_i = i
    while True:
        if temp_i % 2 != 0:
            break
        temp_i /= 2
        c_count += 1
    if mac_c <= c_count:
        mac_c = c_count
        ans = i

print(ans)

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

# ans = 1
# mac_c = 0
# for i in range(2, N+1):
#     c_count = 0
#     temp_i = i
#     while True:
#         if temp_i % 2 != 0:
#             break
#         temp_i /= 2
#         c_count += 1
#     if mac_c <= c_count:
#         mac_c = c_count
#         ans = i

# 別解
# 100以内の数で2の累乗を求めればいい
ans_list = [2**i for i in range(7)]
ans = max([i for i in ans_list if N > i])
print(ans)
Problem p02664 (python)

Fixed submission:
t = list(input())
l = len(t)

for i in range(l):
    if t[i] == "?":
        t[i] = "D"
        print(t[i],end="")
    else:
        print(t[i],end="")

Buggy submission (verdict: Runtime Error):
t = list(input())
l = len(t)

for i in range(l):
    if t[i] == "?":
        if i == 0:
            if t[i+1] == "P":
                t[i] = "D"
                print(t[i],end="")
            else:
                t[i] = "P"
                print(t[i],end="") 
        if i == l-1:
            t[i] = "D"
            print(t[i],end="")
        elif t[i+1] == "P":
            t[i] = "D"
            print(t[i],end="")
        elif t[i+1] == "D" and t[i-1] == "P":
            t[i] = "D"
            print(t[i],end="")
        else:
            t[i] = "P"
            print(t[i],end="")
    else:
        print(t[i],end="")

Buggy submission (verdict: Runtime Error):
t = list(input())
l = len(t)
if t[0] == "?":
    t[0] = "P"
for i in range(l):
    if t[i] == "?":
        if t[i-1] == "P":
            t[i] = "D"
            print(t[i],end="")
        elif t[i+1] == "P":
            t[i] = "D"
            print(t[i],end="")
        else:
            t[i] = "P"
            print(t[i],end="")
    else:
        print(t[i],end="")
Problem p02765 (python)

Fixed submission:
N, R = map(int, input().split())

ans = 100*(10-N)+R
if N>=10:
  print(R)
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
N, R = input().split()

if N<10:
  K = 100*(10-N)
  print(R+K)
else:
  print(N)

Buggy submission (verdict: Runtime Error):
N, R = input().split()

if N<10:
  print(R+100*(10-N))
else:
  print(N)

Buggy submission (verdict: Runtime Error):
N, R = input().split()

if N<10:
  print(R+(100*(10-N)))

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

if N<10:
  K = 100*(10-N)
  print(R+K)
Problem p02783 (python)

Fixed submission:
import math

H,A = map(int, input().split())
print(math.ceil(H/A))

Buggy submission (verdict: Runtime Error):
import math
H,A = map(int, input().split)
print(math.ceil(H/A))

Buggy submission (verdict: Runtime Error):
import math
H, A = int(input()).split()
print(math.ceil(H/A))

Buggy submission (verdict: Runtime Error):
import math
H, A = input().split()
print(math.ceil(H/A))
Problem p02784 (python)

Fixed submission:
H, N = map(int, input().split())
As = map(int,input().split())
print('Yes' if sum(As)>=H else 'No')

Buggy submission (verdict: Runtime Error):
H, N = int(intput().split())
A = map(int , input().split())
print('Yes' if sum(A)>=H else 'No')
Problem p02789 (python)

Fixed submission:
n, m = input().split()
print('Yes') if n==m else print('No')

Buggy submission (verdict: Runtime Error):
n, m = int(input()).split()
print('Yes') if n==m else print('No')