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

Fixed submission:
# -*- coding: utf-8 -*-

N, M = map(int, input().split())

answer_list = [0] * M
prefectures = [0] * (N+1)
data_set = [0] * M

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P, Y, i]

data_set.sort()

for i in range(M):
	answer = ''
	P, Y, a = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for k in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list[a] = answer

for i in range(M):
	print(answer_list[i])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int, input().split())

answer_list = [0] * M
prefectures = [0] * (M+1)
data_set = [0] * M

data_set_dict = {}

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P, Y, i]

data_set.sort()

for i in range(M):
	answer = ''
	P, Y, a = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for k in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list[a] = answer

for i in range(M):
	print(answer_list[i])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int, input().split())

answer_list = [0] * M
prefectures = [0] * (M+1)
data_set = [0] * M

data_set_dict = {}

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P, Y, i]

data_set.sort()

for i in range(M):
	answer = ''
	P, Y, a = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for j in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list[a] = (answer)

for i in range(M):
	print(answer_list[i])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, M = map(int, input().split())

answer_list = []

prefectures = [0] * (M+1)
data_set = [0] * M

data_set_dict = {}

for i in range(M):
	P, Y = map(int, input().split())
	data_set[i] = [P,  Y]
	data_set_dict[P, Y] = i

data_set.sort()

for i in range(M):
	answer = ''
	P, Y = data_set[i]
	prefectures[P] += 1

	for j in range(6-len(list(str(P)))):
		answer += '0'

	answer += str(P)

	for j in range(6-len(list(str(prefectures[P])))):
		answer += '0'

	answer += str(prefectures[P])

	answer_list.append([data_set_dict[P, Y], answer])

answer_list.sort()

for i in range(M):
	print(answer_list[i][1])
Problem p03222 (python)

Fixed submission:
# -*- coding: utf-8 -*-

H, W, K = map(int,input().split())

mod = 1000000007

fibonacci = [1,1,2,3,5,8,13,21] # W <= 8なのでこれだけでいい

Amida = [ [0] * W for h in range(H+1)]

for h in range(H+1):
	if W == 1:
		break
	for w in range(W):
		if h == 0:
			if w == 0:
				Amida[h][w] = 1
			else:
				break
		elif w == 0:
			Amida[h][w] = fibonacci[W-2] * Amida[h-1][w+1] + fibonacci[W-1] * Amida[h-1][w]
		elif w == W-1:
			Amida[h][w] = fibonacci[W-2] * Amida[h-1][w-1] + fibonacci[W-1] * Amida[h-1][w]
		else:
			Amida[h][w] += (fibonacci[w-1] * fibonacci[W-w-1] * Amida[h-1][w-1])
			Amida[h][w] += (fibonacci[w] * fibonacci[W-w-1] * Amida[h-1][w])
			Amida[h][w] += fibonacci[w] * fibonacci[W-w-2] * Amida[h-1][w+1]

		Amida[h][w] = Amida[h][w] % mod

if W == 1:
	if K == 1:
		print(1)
	else:
		print(0)
else:
	print(Amida[H][K-1])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

H, W, K = map(int,input().split())

mod = 1000000007

fibonacci = [1,1,2,3,5,8,13,21] # W <= 8なのでこれだけでいい

Amida = [ [0] * W for h in range(H+1)]

for h in range(H+1):
	if W == 1:
		break
	for w in range(W):
		if h == 0:
			if w == 0:
				Amida[h][w] = 1
			else:
				break
		elif w == 0:
			Amida[h][w] = fibonacci[W-2] * Amida[h-1][w+1] + fibonacci[W-1] * Amida[h-1][w]
		elif w == W-1:
			Amida[h][w] = fibonacci[W-2] * Amida[h-1][w-1] + fibonacci[W-1] * Amida[h-1][w]
		else:
			Amida[h][w] += (fibonacci[w-1] * fibonacci[W-w-1] * Amida[h-1][w-1])
			Amida[h][w] += (fibonacci[w] * fibonacci[W-w-1] * Amida[h-1][w])
			Amida[h][w] += fibonacci[w] * fibonacci[W-w-2] * Amida[h-1][w+1]

Amida[h][w] = Amida[h][w] % mod

if W == 1:
	if K == 1:
		print(1)
	else:
		print(0)
else:
	print(Amida[H][K-1])
Problem p02859 (python)

Fixed submission:
r = int(input())

print(r**2)

Buggy submission (verdict: Runtime Error):
X,Y  = input().split()
X = int(X)
Y = int(Y)
if (X+Y)%3 != 0:
    print(0)
else:
    n = (2*X-Y)/3
    m = (2*Y-X)/3
    top = 1
    bot = 1
    n = int(n)
    m = int(m)
    for i in range(n):
        top *= (n + m) - i
        bot *= n - i

result = (top/bot) % ((10**9)+7)
result = int(result)
print(result)

Buggy submission (verdict: Runtime Error):
X,Y  = input().split()
X = int(X)
Y = int(Y)
if (X+Y)%3 != 0:
    print(0)
else:
    n = (2*X-Y)/3
    m = (2*Y-X)/3
    top = 1
    bot = 1
    n = int(n)
    m = int(m)
    for i in range(n):
        top *= (n + m) - i
        bot *= n - i

result = (top/bot) % ((10**9)+7)

print(result)

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

def main(N,S):
    N = int(N)
    if N%2 == 1:
        print('No')
    else:
        l=int(N/2)

        S1 = S[:l]
        S2 = S[l:]

        if S1 == S2:
            print('Yes')
        else:
            print('No')


main(N,S)

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

def main(N,S):
    N = int(N)
    if N%2 == 1:
        print('No')
    else:
        l=int(N/2)

        S1 = S[:l]
        S2 = S[l:]

        if S1 == S2:
            print('Yes')
        else:
            print('No')

main(N,S)

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

print r**2
Problem p02897 (python)

Fixed submission:
#Coding:Utf-8
N=int(input())
if N%2==0:
    print('{:.10f}'.format(N/2/N))
elif N%2==1:
    print('{:.10f}'.format((int(N/2)+1)/N))

Buggy submission (verdict: Runtime Error):
#Coding:Utf-8
N=int(input())
print(f'{2/N:.10f}')
Problem p03077 (python)

Fixed submission:
#Coding: utf-8
N=int(input())
a=[]
for i in range(5):
  a.append(int(input()))
import math
print(math.ceil(N/min(a))+4)

Buggy submission (verdict: Runtime Error):
#Coding: utf-8
N=int(input())
a=[]
for i in 5:
  a.append(int(input()))
import math
print(math.ceil(N/min(a))-4)

Buggy submission (verdict: Runtime Error):
#Coding: utf-8
2.N=int(input())
3.a=[]
4.for i in 5:
5.  a.append(int(input()))
6.import math
7.print(math.ceil(N/min(a))-4)

Buggy submission (verdict: Runtime Error):
#Coding: utf-8
N=in(input())
a=[]
for i in 5:
  a.append(int(input()))
import math
print(math.ceil(N/min(a))-4)
Problem p02836 (python)

Fixed submission:
s = input()
count = 0

for i in range(len(s)//2):
  if s[i] != s[-1-i]:
    count += 1
    
print(count)

Buggy submission (verdict: Runtime Error):
s = input()
count = 0

for i in range(len(s)//2):
  if s[i] != s[-1]:
    count += 1
    
return count
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i * j == N:
      print("Yes")
print("No")

Buggy submission (verdict: Runtime Error):
a.b=map(int,input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)
Problem p02915 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input()
print(n**3)
Problem p02933 (python)

Fixed submission:
a=int(input())
s=str(input())
if a >= 3200:
  print(s)
else:
  print("red")

Buggy submission (verdict: Runtime Error):
a=input()
s=input()
if a >= 3200:
  print(s)
else:
  print("red")
Problem p02951 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input())
print(max(0,c-(a-b)))

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

Fixed submission:
p,q,r = map(int,input().split())
print(min(p+q, q+r, r+p))

Buggy submission (verdict: Runtime Error):
p,q,r = map(int(input().split()))
print(min(p+q,p+r,q+r))

Buggy submission (verdict: Runtime Error):
p,q,r = map(int(input().split()))
print(min(p+q,p+r,q+r)

Buggy submission (verdict: Runtime Error):
p,q,r = map(int(input().split()))
print(min((p+q),(p+r),(q+r)))
Problem p03135 (python)

Fixed submission:
t,x=map(int,input().split())
print(t/x)

Buggy submission (verdict: Runtime Error):
T=int(input())
X=int(input())
print(T/X)
Problem p03631 (python)

Fixed submission:
a,b,c=input()
print("Yes" if a==c else "No")

Buggy submission (verdict: Runtime Error):
a,b,c=input()
print("Yes" if a==c else No)

Buggy submission (verdict: Runtime Error):
a,b,c=input()
print("Yes" if a==2 else No)
Problem p02835 (python)

Fixed submission:
A1, A2, A3 = map(int, input().split())

if sum([A1, A2, A3]) >= 22:
  print('bust')
else:
  print('win')

Buggy submission (verdict: Runtime Error):
a,b,c = int(input().split(" "))
if a + b + c == 22:
  print("bust")
Problem p02835 (python)

Fixed submission:
#A-Blackjack
a1, a2, a3 = map(int, input().split())
total = a1 + a2 + a3

if total >=22:
    print('bust')
else:
    print('win')

Buggy submission (verdict: Runtime Error):
#D - Xor Sum 4

import math
n=int(input())
al=list(map(int,input().split()))
a=['{:060b}'.format(x) for x in al]
a=''.join(a)
 
m=math.ceil(math.log(max(1,max(al)),2))
 
ans=0
for i in range(m):
  sum1=a[59-i::60].count('1')
  sum0=n-sum1
  ans+=2**i*sum1*sum0
 
print(ans%(10**9+7))
Problem p02835 (python)

Fixed submission:
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
if a + b + c < 22:
	print("win")
else:
	print("bust")

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

if a + b + c <22:
  print("win")
else:
  print("bust")
Problem p02835 (python)

Fixed submission:
a,b,c = map(int,input().split())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().sprit())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")
Problem p02880 (python)

Fixed submission:
n = int(input())
s = [2,3,4,5,6,7,8,9]
flag = True
 
if 1<= n <=9:
    print("Yes")
    flag = False
else:
    for i in s:
        if n % i == 0 and n/i <= 9:
            flag = False
            print("Yes")
            break
if flag:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [2,3,4,5,6,7,8,9]
frag = True

if n<=9:
    print("Yes")
else:
    for i in s:
        if n % i == 0:
            flag = False
            print("Yes")
            break
if flag:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [2,3,4,5,6,7,8,9]
frag = False
 
for i in s:
    if n % i == 0:
        print("Yes")
        flag = True
        break
if not flag:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [2,3,4,5,6,7,8,9]
frag = False

for i in s:
  if n % s[i] == 0:
    print("Yes")
    flag = True
    break
if not flag:
  print("No")
Problem p02891 (python)

Fixed submission:
import re
 
s = input()
k = int(input())
 
frag = False
 
def nchars(s, n):
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]
        
s_ = list(nchars(s,1))
 
for i in s_[0]:
  s1 = i
for i in s_[-1]:
  s2 = i
 
if s1 == s2:
  frag = True
 
l = [len(i) for i in s_]
 
c = l[0]//2
 
c1 = 0
c2 = 0
c3 = 0

for i in range(len(l)):
  if i != len(l)-1:
    c1 += l[i]//2
  else:
    if not frag:
      c1 += l[i] // 2
    else:
      c2 = (l[0]+l[i])//2
      c3 = l[i]//2

if len(l) == 1:
  print((l[0]*k)//2)

elif not frag:
  print(c1*k)
else:
  print(c + (c1-c)*k + c2*(k-1) + c3)

Buggy submission (verdict: Runtime Error):
import re

s = input()
k = int(input())

frag = False

def nchars(s, n):
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]
        
s_ = list(nchars(s,1))

for i in s_[0]:
  s1 = i
for i in s_[-1]:
  s2 = i

if s1 == s2:
  frag = True

l = [len(i) for i in s_]

c = len(l[0])//2

c1 = 0
c2 = 0

for i in range(len(l)-1):
  if i != len(l)-1:
    c1 += l[i+1]//2
  else:
    if frag:
      c1 += l[i] // 2
    else:
      c2 = (l[0]+l[i])//2
  
if not frag:
  print(c1*k)
else:
  print(c1)
Problem p02989 (python)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
p.sort()
 
ans = p[n//2] - p[n//2-1]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int,input().split()))
p.sort() 
ans = p[n/2] - p[n/2-1]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
p = list(map(int,input().split()))
ps = p.sort()

ans = ps[n/2] - ps[n/2-1]
print(ans)
Problem p03042 (python)

Fixed submission:
s = [int(i) for i in input()]
f = s[0]*10 + s[1]
l = s[2]*10 + s[3]

if 1 <= f <= 12 and 1 <= l <= 12:
  print("AMBIGUOUS")
elif 1 <= f <= 12:
  print("MMYY")
elif 1 <= l <= 12:
  print("YYMM")
else:
  print("NA")

Buggy submission (verdict: Runtime Error):
s = [input()]
f = int(s[0])*10 + int(s[1])
l = int(s[2])*10 + int(s[3])

if 1 <= f <= 12 and 1 <= l <= 12:
  print("AMBIGUOUS")
elif 1 <= f <= 12:
  print("MMYY")
elif 1 <= l <= 12:
  print("YYMM")
else:
  print("NA")
Problem p02835 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a+b+c>=22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input(),split())
if a+b+c >= 22:
  print(bust)
else:
  print(win)
Problem p02859 (python)

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

Buggy submission (verdict: Runtime Error):
r=int(input)
print(r**2)
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if a>=10 or b>=10:
  print(-1)
else:
  print(a*b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>=9 or b>=9 :
  print(-1)
else a<=9 and b<=9 :
  print(a*b)

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split)
if 1<=a<=9 and 1<=b<=9:
  print("a*b")
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split)
if 1<=a<=9, 1<=b<=9:
  print("a*b")
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if 1<=a<=9, 1<=b<=9:
  print("a*b")
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
if 1<a,b<9:
  print(a+b)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
a,b =map(int(),input().split())
if a>=10 b>10 :
  print("-1")
else :
  print(a*b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>9 b>9 
 print("-1")
else :
  print(a*b)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
if 1<=A<=9, 1<=B<=9:
  print("A*B")
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
A, B=int(input())
if 1<=A<=9, 1<=B<=9:
  print("A*B")
else:
  print("-1")
Problem p02915 (python)

Fixed submission:
N=int(input())
if 1<=N<=9:
  print(N**3)

Buggy submission (verdict: Runtime Error):
n=int.(input())
print(n**3)
Problem p02835 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a+b+c >= 22:
   print("bust")
else:
   print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a+b+c >= 22:
   print("bust")
    else:
      print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,imput().split())
if a+b+c >= 22
   print("bust")
    else:
      print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,imput().split())
if a+b+c >= 22:
   print("bust")
    else:
      print("win")
Problem p02847 (python)

Fixed submission:
S=input()
if S=="SUN":
  print("7")
elif S=="MON":
  print("6")
elif S=="TUE":
  print("5")
elif S=="WED":
  print("4")
elif S=="THU":
  print("3")
elif S=="FRI":
  print("2")
elif S=="SAT":
  print("1")

Buggy submission (verdict: Runtime Error):
S=input()
if S="SUN":
  print("7")
elif S="MON":
  print("6")
elif S="TUE":
  print("5")
elif S="WED":
  print("4")
elif S="THU":
  print("3")
elif S="FRI":
  print("2")
elif S="SAT":
  print("1")

Buggy submission (verdict: Runtime Error):
input(S)
if S="SUN":
  print("7")
elif S="MON":
  print("6")
elif S="TUE":
  print("5")
elif S="WED":
  print("4")
elif S="THU":
  print("3")
elif S="FRI":
  print("2")
elif S="SAT":
  print("1")

Buggy submission (verdict: Runtime Error):
input(S)
if S="SUN":
  print(7)
elif S="MON":
  print(6)
elif S="TUE":
  print(5)
elif S="WED":
  print(4)
elif S="THU":
  print(3)
elif S="FRI":
  print(2)
elif S="SAT":
  print(1)
Problem p02879 (python)

Fixed submission:
A,B=map(int,input().split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input.split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input.split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print"-1"

Buggy submission (verdict: Runtime Error):
if 1 <= A <= 9  1 <= B <= 9
  print(A*B)
else:
  print("-1")
Problem p02915 (python)

Fixed submission:
n=int(input())
print(n*n*n)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a=b=c:
  print(1)
elif a=b!=c:
  print(3)
else:
  print(6)
Problem p02951 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split)
print(c-(a+b))
Problem p02835 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a+b+c >= 22:
  print("bust")
else 
  print("win")
Problem p02835 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a+b+c >= 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
A1 = input()
A2 = input()
A3 = input()
Problem p02847 (python)

Fixed submission:
S=input()
if S=="SUN":
  print(7)
elif S=="MON":
  print(6)
elif S=="TUE":
  print(5)
elif S=="WED":
  print(4)
elif S=="THU":
  print(3)
elif S=="FRI":
  print(2)
elif S=="SAT":
  print(1)

Buggy submission (verdict: Runtime Error):
S=input()
if S="SUN":
  print("0")
elif S="MON":
  print("1")
elif S="TUE":
  print("2")
elif S="Wed":
  print("3")
elif S="THU":
  print("4")
elif S="FRI":
  print("5")
elif S="SAT":
  print("6")

Buggy submission (verdict: Runtime Error):
S=input()
if S="SUN":
  print("0")
  elif S="MON":
  print("1")
  elif S="TUE":
  print("2")
  elif S="Wed":
  print("3")
  elif S="THU":
  print("4")
  elif S="FRI":
  print("5")
  elif S="SAT":
  print("6")

Buggy submission (verdict: Runtime Error):
if S="SUN":
  print("0")
  elif S="MON":
  print("1")
  elif S="TUE":
  print("2")
  elif S="Wed":
  print("3")
  elif S="THU":
  print("4")
  elif S="FRI":
  print("5")
  elif S="SAT":
  print("6")

Buggy submission (verdict: Runtime Error):
if S="SUN":
  print("0")
  elif S="MON"
  print("1")
  elif S="TUE"
  print("2")
  elif S="Wed"
  print("3")
  elif S="THU"
  print("4")
  elif S="FRI"
  print("5")
  elif S="SAT"
  print("6")
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if 1<=a<=9 AND 1<=b<=9:
  print(a*b)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if 1=<a<=9 AND 1=<b<=9:
  print(a*b)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if 1=<a<=20 AND 1=<b<=20:
  print(a*b)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (a >=1) AND (a <= 20) AND (b >=1) AND (b =< 20):
  print(a*b)
else:
  print("-1")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (1 =< a <= 20) AND (1 =< b <= 20)
  print(a*b)
  else:
    print("-1")
Problem p02835 (python)

Fixed submission:
A1, A2, A3 = map(int, input().split())
total = A1 + A2 + A3
if total >= 22:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
A1, A2, A3 = map(int, split(input()))
total = A1 + A2 + A3
if total >= 22:
    print("bust")
else:
    print("win")
Problem p02912 (python)

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

n, m = map(int, input().split())
li = [-int(i) for i in input().split()]
li = sorted(li)

for _ in range(m):
	x = heapq.heappop(li)
	#print(x)
	if x % 2 == 0:
		heapq.heappush(li, x // 2)
	else:
		heapq.heappush(li, x // 2 + 1)
	#print(li)
print(-sum(list(li)))

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

n, m = map(int, input().split())
li = list(map(int, input().split()))

for _ in range(m):
	heapq._heapify_max(li) 
	x = heapq._heappop_max(li)
	heapq.heappush(li, x // 2)
print(sum(list(li)))

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

n, m = map(int, input().split())
li = list(map(int, input().split()))

for _ in range(m):
	heapq._heapify_max(li) 
	x = heapq._heappop_max(li)
	heapq.heappush(li, x // 2)
print(sum(list(li)))
Problem p02933 (python)

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


a = int(input())
s = input().strip()

if a >= 3200:
	print(s)
else:
	print("red")

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

s = input().strip()
t = input().strip()
n = len(s)
m = len(t)
p = 0
q = 0
fold = 0
l = [[] for _ in range(26)]
lim = [0 for _ in range(26)] 
for i, x in enumerate(s):
	l[ord(x) - 97].append(i)
	lim[ord(x) - 97] += 1
r = [0 for _ in range(26)]
cur = -1
while (q < m):
	x = t[q]
	ind = ord(x) - 97
	#print(x, cur)
	if l[ind] == []:
		print(-1)
		exit(0)
	else:
		#print("HERE", r[ind], lim[ind])
		if r[ind] >= lim[ind]:
			fold += 1
			r = [0 for _ in range(26)]
			cur = -1
		else:
			c = l[ind][r[ind]]
			flag = True
			while (c <= cur):
				r[ind] += 1
				if r[ind] >= lim[ind]:
					flag = False
					break
				c = l[ind][r[ind]]
			if flag == False:
				fold += 1
				r = [0 for _ in range(26)]
				cur = -1
			elif c > cur:
				cur = c
				q += 1
				r[ind] += 1
			else:
				fold += 1
				r = [0 for _ in range(26)]
				cur = -1
#print(fold, n, cur)
print(fold * n + cur + 1)
Problem p02847 (python)

Fixed submission:
s = input()
week = ("SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT")

print(7 - week.index(s))

Buggy submission (verdict: Runtime Error):
s = input()
week = ("SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT")

print(7 - index.week(s))
Problem p02836 (python)

Fixed submission:
s = input()
num = int(len(s)/2)
count = 0

for i in range(num):
  if s[i] != s[len(s)-i-1]:
    count+=1
print(count)

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

if len(s)%2:
  l1 =s[0:len(s)//2]
  l2 =s[len(s)//2:]
  count=0
  for i in range(len(l1)):
    if l1[i] != l2[i]:
      count += 1
else:
  l1 =s[0:len(s)//2]
  l2 =s[len(s)+1//2:]
  count=0
  for i in range(len(l1)):
    if l1[i] != l2[i]:
      count += 1

print(count)
Problem p02835 (python)

Fixed submission:
a, b, c = map(int,input().split())
if a+b+c <= 21:
  print("win")
else:
    print("bust")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a+b+c <= 21:
  print("win")
  else a+b+c >= 21:
    print("bust")
Problem p02835 (python)

Fixed submission:
A1, A2, A3 = input().split()

sum = int(A1) + int(A2) + int(A3)

if sum < 22:
	print('win')

elif sum > 21:
	print('bust')

Buggy submission (verdict: Runtime Error):
A1 = input()
A2 = input()
A3 = input()

sum = int(A1) + int(A2) + int(A3)

if sum < 22:
	print('win')

elif sum > 21:
	print('bust')
Problem p02835 (python)

Fixed submission:
A1,A2,A3 = map(int,input().split())
sum=A1+A2+A3
if(sum >= 22):
   print("bust")
else:
   print("win")

Buggy submission (verdict: Runtime Error):
num1 = int(input("Value1:"))
num2 = int(input("Value3:"))
num3 = int(input("Value3:"))
sum=num1+num2+num3
print("Sum:",sum)
if(sum < 22):
   print("Win")
else:
   print("Bust")