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

Fixed submission:
s = {}
m = 0
for _ in range(int(input())):
  t = input()
  if t in s:
    s[t] += 1
  else:
    s[t] = 1
  m = max(m, s[t])
ans = []
for el in s:
  if s[el] == m:
    ans.append(el)
ans.sort()
for a in ans:
  print(a)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
s = defaultdict()
m = 0
for _ in range(int(input())):
  t = input()
  s[t] += 1
  m = max(m, s[t])
ans = []
for el in s:
  if s[el] == m:
    ans.append(el)
ans.sort()
for a in ans:
  print(a)
Problem p02777 (python)

Fixed submission:
s = list(map(str, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]
 
ALL[input()] -= 1
 
for i in range(len(s)):
  print(ALL[s[i]], end = ' ')

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]

k = input()
ALL[k] -= 1
 
for i in range(len(s)):
  print(ALL[s[i]], end = ' ')

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().split()))
num = list(map(int, input().split()))
ALL = {}
for i in range(len(s)):
  ALL[s[i]] = num[i]

ALL[input()] -= 1

for i in range(len(s)):
  print(ALL[s[i]], end = ' ')
Problem p02759 (python)

Fixed submission:
N = int(input())
if N%2 == 0:
  print(N//2)
else:
  print(N//2 + 1)

Buggy submission (verdict: Runtime Error):

a,b,c = list(map(int, input().split()))
d,e,f = list(map(int, input().split()))	
g,h,k = list(map(int, input().split()))
N = int(input())
l = []
for i in range(N):
	e=int(input())
	l.append(e)
L1 = {a,d,g}
L2 = {a,b,c}
L3 = {a,e,k}
L4 = {c,f,k}
L5 = {g,h,k}
L6 = {c,e,g}
for i in range(N):
	for j in range(N):
		for k in range(N):
			s = set([l[i],l[j],l[k]])
			if (s == L1) or (s == L2) or (s == L3) or (s == L4) or (s == L5) or (s == L6) :
				print('Yes')
				exit(0)
		
print('No')

Buggy submission (verdict: Runtime Error):

a,b,c = list(map(int, input().split()))
d,e,f = list(map(int, input().split()))	
g,h,k = list(map(int, input().split()))
N = int(input())
l = []
for i in range(N):
	e=int(input())
	l.append(e)
L1 = {a,d,g}
L2 = {a,b,c}
L3 = {a,e,k}
L4 = {c,f,k}
L5 = {g,h,k}
L6=  {c,e,g}
for i in range(N):
	for j in range(N):
		for k in range(N):
			s = set([l[i],l[j],l[k]])
			if (s == L1) or (s == L2) or (s == L3) or (s == L4) or (s == L5) or (s==L6):
				print('Yes')
				exit(0)
		
print('No')
Problem p02759 (python)

Fixed submission:
x = int(input())
print(int(x/2) if x % 2 == 0 else int((x + 1)/2) )

Buggy submission (verdict: Runtime Error):
bingo = [list(map(int, input().split())) for _ in range(3)]
N = int(input())

for i in range(N):
    b = int(input())
    for j in range(len(bingo)):
            if b == bingo[j]:
                bingo[j] = 0

true_list = list()
for i in [0, 3, 6]:
    if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:
        true_list.append(0)
for i in [0, 1, 2]:
    if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:
        true_list.append(0)
if (bingo[0] + bingo[4] + bingo[8]) == 0:
    true_list.append(0)
if (bingo[2] + bingo[4] + bingo[6]) == 0:
    true_list.append(0)

if not all(true_list):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
inp = [int(x) for x in input().split()]

bingo = inp[0:9]
b = inp[10:]

for i in b:
    for j in range(len(bingo)):
            if i == bingo[j]:
                bingo[j] = 0

true_list = list()
for i in [0, 3, 6]:
    if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:
        true_list.append(0)
for i in [0, 1, 2]:
    if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:
        true_list.append(0)
if (bingo[0] + bingo[4] + bingo[8]) == 0:
    true_list.append(0)
if (bingo[2] + bingo[4] + bingo[6]) == 0:
    true_list.append(0)

if not all(true_list):
    print('Yes')
else:
    print('No')
Problem p02759 (python)

Fixed submission:
n=int(input())

if n%2==0:
  n=n/2
  print(int(n))
else:
  n=n//2+1
  print(int(n))

Buggy submission (verdict: Runtime Error):
import sys

def henkan(l1):
  maped_num = map(str,l1)
  s=''.join(maped_num)
  return s


keta,num = map(int,input().rstrip().split())
l=[]

if num ==0:
  print(num)
  sys.exit()
  
  
for i in range(keta):
  l.append("#")
  

for i in range(num):
    a,b = map(int,input().rstrip().split())
    a=a-1
    if l[a]=="#":
      l[a]=b 
    elif l[a] > b:
      l[a]=b     


      
if l[0] == "#":
  print("-1")
elif l[0] == 0:
  print("-1")
elif l[1]=="#":
  l[1]=0
  x=henkan(l)
  print(x)
elif l[2]=="#":
  l[2]=0
  x=henkan(l)
  print(x)
else:
  x=henkan(l)
  print(x)

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

if 0==n/2:
  n=n/2
  print(n)
else:
  n=n/2+1
  print(n)
Problem p02771 (python)

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

if a==b or a==c or b==c:
  if a==b and a==c:
    print("No")
  else:
    print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=int(input())#入力回数を決める

l=[]
num2=1
num3=1
l = list(map(int,input().rstrip().split()))
for i in range(N):
  
  if l[i] % 2 == 0:
    if l[i] % 3 == 0 and l[i] % 5 == 0:
      num2=0
    else:
      num3=0


  


        
if num2==0:
  if num3==0:
    print("DENIED")
  else:
    print("APPROVED")
else:
  print("DENIED")
Problem p02759 (python)

Fixed submission:
N = int(input())
print(N // 2 + N % 2)

Buggy submission (verdict: Runtime Error):
A = []
A11,A12,A13 = map(int, input().split())
A21,A22,A23 = map(int, input().split())
A31,A32,A33 = map(int, input().split())
N = int(input())
B = []
for i in range(N):
  B.append(int(input()))
  
A = [[A11,A12,A13],
     [A21,A22,A23],
     [A31,A32,A33]]

sets = []

for i in range(3):
  s = []
  for j in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
for j in range(3):
  s = []
  for i in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
sets.append([A11,A22,A33])
sets.append([A13,A22,A31])

for s in sets:
  count = 0
  for b in B:
    if b in s : 
      count+=1
  if count == 3:
    print("Yes")
    break
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
print(N // 2 + N % 2)
Problem p02759 (python)

Fixed submission:
n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))

Buggy submission (verdict: Runtime Error):
n,m = list(map(int, input().split()))
s = []
c = []
for _ in range(m):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

if n == 1:
    for i in range(10):
        istr = str(i)
        flag = True #このTrueは毎回新しくTrueになる
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            if flag == True:
                print(i)
                break
else: # n!=1
    for i in range(10**(n-1),10**n):
        istr = str(i)
        flag = True
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            else: #あっていた場合何もしない
                pass
        if flag:
            print(i)
            break

Buggy submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
    index = digit - 1
    if res[index] == 0:
        res[index] = number
    else: #　すでに他の値が入っている場合
        if res[index] >= number: #　新しいnumberの方が小さい場合
            res[index] = number
        else:
            pass

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
    print(res)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])
  
res = [0 for i in range(N)]
for digit, number in zip(s,c):
    digit -= 1
    if not res[digit] == 0:
        if res[digit] <= number:
            res[digit] = numer
        else:
            continue
    res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if convert[0] == 0:
    print(-1)
elif len(str(res)) == N:
    print(res)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
  digit -= 1
  res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
  print(res)
else:
  print(-1)
Problem p02881 (python)

Fixed submission:
N = int(input())
a = int(N**0.5)
ans = 10 ** 12
for x in range(1,a+1):
    b = N / x
    if b == int(b):
        if x + b - 2 < ans:
            ans = x+b-2
print(int(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = int(N**0.5)
ans = 10**6
for x in range(0,a+1):
    b = N / x
    if b == int(b):
        if a + b - 2 < ans:
            ans = a+b-2
print(ans)
Problem p02759 (python)

Fixed submission:
import math
N = int(input())
col = math.floor(N / 2)
judge = N % 2
if judge ==0:
  print(col)
else:
  col += 1
  print(col)

Buggy submission (verdict: Runtime Error):
N = input()
col = N / 2
if col == 0:
  print(col)
else:
  col += 1
  print(col)
Problem p02759 (python)

Fixed submission:
N=int(input())
def page(N):
  if N%2==1:
    N=N+1
  N=N//2
  print(N)
page(N)

Buggy submission (verdict: Runtime Error):
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    break
for i in range(line_b[1]):
  for j in range(line_b[1]):
    if line[i][0]==line[j][0] and line[i][1]!=line[j][1]:
      num[0]=0
if num[0]==0:
  print(-1)
else:
  number=0
  for i in range(line_b[0]):
    number+=num[i]*10**(line_b[0]-1-i)
  print("%d" %number)

Buggy submission (verdict: Runtime Error):
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    break
for i in range(line_b[1]):
  for j in range(line_b[1]):
    if line[i][0]==line[j][0] and line[i][1]!=line[j][1]:
      num[0]=0
if num[0]==0 or num[0]<0 or num[1]<0 or num[2]<0 or num[0]>9 or num[1]>9 or num[2]>9:
  print(-1)
else:
  print("%d%d%d" %(num[0],num[1],num[2]))

Buggy submission (verdict: Runtime Error):
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=0 and num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    i=line_b[1]
if num[0]==0 or num[0]<0 or num[1]<0 or num[2]<0:
  print(-1)
else:
  print("%d%d%d" %(num[0],num[1],num[2]))
Problem p02759 (python)

Fixed submission:
a = int(input())
res = a // 2
if a % 2 > 0:
  res += 1
  
print(res)

Buggy submission (verdict: Runtime Error):
a = input()
res = a//2
if a%2 >0:
  res += 1
print(res)

Buggy submission (verdict: Runtime Error):
a = input()
res = a // 2
if a % 2 > 0:
  res += 1
print(res)
Problem p02759 (python)

Fixed submission:
N = int(input())
if N % 2==0:
  print(int(N/2))
  
else:
  print(int((N/2)+1))

Buggy submission (verdict: Runtime Error):
N = int(input())
if N % 2 ==0:
  print(N/2)
 
else:
  ptint(1+N/2)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N % 2 ==0:
  print(N/2)

else:
  ptint(1+N/2)
Problem p02759 (python)

Fixed submission:
N = int(input())
num = N + (N % 2)
print(int(num/2))

Buggy submission (verdict: Runtime Error):
N = input()
print(int((N + (N % 2))/2))

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
print( N / 2 + (N % 2))

Buggy submission (verdict: Runtime Error):
N / 2 + (N % 2)
Problem p02759 (python)

Fixed submission:
a = int(input())

b = int(a/2)

if b < a / 2:
  b = b + 1
 
print(b)

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

result = []
for _ in range(n):
  result.append(-1)

for _ in range(m):
  s, c = map(int, input().split())
  if result[s-1] not in [-1, c]:
    print(-1)
    exit()
  elif s == 1 and c == 0:
    print(-1)
    exit()
  else:
    result[s-1] = c

for _ in range(len(result)):
  if result[_] == -1:
    result[_] = 1
  
result = map(str, result)
result = "".join(result)
  
print(result)

Buggy submission (verdict: Runtime Error):
a11, a12, a13 = map(int, input().split())
a21, a22, a23 = map(int, input().split())
a31, a32, a33 = map(int, input().split())
N = int(input())
num = []
for _ in range(N):
  num.append(int(input()))
  
bingo = [
  [a11, a12, a13], 
  [a21, a22, a23], 
  [a31, a32, a33]
]
 
for n in range(3):
  for m in range(3): 
    if bingo[n][m] in num:
      bingo[n][m] = 0

row1 = bingo[0][0] + bingo[0][1] + bingo[0][2]
row2 = bingo[1][0] + bingo[1][1] + bingo[1][2]
row3 = bingo[2][0] + bingo[2][1] + bingo[2][2]
 
col1 = bingo[0][0] + bingo[1][0] + bingo[2][0]
col2 = bingo[0][1] + bingo[1][1] + bingo[2][1]
col3 = bingo[0][2] + bingo[1][2] + bingo[2][2]
 
cross1 = bingo[0][0] + bingo[1][1] + bingo[2][2]
cross2 = bingo[2][0] + bingo[1][1] + bingo[2][0]
 
if 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a11, a12, a13 = map(int, input().split())
a21, a22, a23 = map(int, input().split())
a31, a32, a33 = map(int, input().split())
N = int(input())
num = []
for _ in range(N):
  num.append(int(input()))
  
bingo = [
  [a11, a12, a13], 
  [a21, a22, a23], 
  [a31, a32, a33]
]

for n in range(3):
  for m in range(3): 
    if bingo[n][m] in num:
      bingo[n][m] = 0

row1 = bingo[0][0] + bingo[0][1] + bingo[0][2]
row2 = bingo[1][0] + bingo[1][1] + bingo[1][2]
row3 = bingo[2][0] + bingo[2][1] + bingo[2][2]

col1 = bingo[0][0] + bingo[1][0] + bingo[2][0]
col2 = bingo[0][1] + bingo[1][1] + bingo[2][1]
col3 = bingo[0][2] + bingo[1][2] + bingo[2][2]

cross1 = bingo[0][0] + bingo[1][1] + bingo[2][2]
cross2 = bingo[2][0] + bingo[1][1] + bingo[2][0]

if 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:
  print("Yes")
else:
  print("No")
Problem p02759 (python)

Fixed submission:
n = int(input())

if n%2:
  print((n+1)//2)
else:
  print(n//2)

Buggy submission (verdict: Runtime Error):
-*- coding: utf-8 -*-
  
n = input()

if n%2 == 0:
  print(n/2)
else:
  print((n+1)/2)

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

if n%2 == 0:
  print(n/2)
else:
  print((n+1)/2)

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

if N%2 == 0:
  print(N/2)
else:
  print((N+1)/2)
Problem p02859 (python)

Fixed submission:

r = int(input())
print (r*r)

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

N = int(input())
x = []
y = []

for i in range(N):
    p, q = map(int, input().split())
    x.append(p)
    y.append(q)

ans = 0

for i in range(N):
    for j in range(N):
        if i == j:
            continue
#        print ("i="+str(i)+", j="+str(j))
#        print ("xi="+str(x[i])+", xj="+str(x[j]))
#        print ("yi="+str(y[i])+", yj="+str(y[j]))
        ans += math.sqrt((x[i]-x[j])**2+(y[i]-y[j])**2)

ans = ans / N
print (ans)

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

N = int(input())
x = []
y = []

for i in range(N):
    p, q = map(int, input().split())
    x.append(p)
    y.append(q)

ans = 0

for i in range(N):
    for j in range(N):
        print ("i="+str(i)+", j="+str(j))
        print ("xi="+str(x[i])+", xj="+str(x[j]))
        print ("yi="+str(y[i])+", yj="+str(y[j]))
        ans += math.sqrt((x[i]-x[j])**2+(y[i]-y[j])**2)

ans = ans / N
print (ans)

Buggy submission (verdict: Runtime Error):

print (r*r)
Problem p03137 (python)

Fixed submission:
def main():
    N, M = map(int, input().split())
    X = list(map(int, input().split()))
    if N >= M:
        print(0)

    else:
        X.sort()
        dist = [abs(X[i] - X[i+1]) for i in range(M-1)]
        dist.sort()
        ans = sum(dist[:(M-N)])
        print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N, M = map(int, input().split())
    if N >= M:
        print(0)
        return

    X = list(map(int, input().split()))
    X.sort()
    dist = [abs(X[i] - X[i+1]) for i in range(M-1)]
    ranking = [[i for i in range(N-1)], [dist[i] for i in range(N-1)]]
    for i in range(N-1, M-1):
        mind = min(ranking[1])
        if dist[i] > mind:
            ind = ranking[1].index(mind)
            ranking[0][ind] = i
            ranking[1][ind] = dist[i]

    ranking[0].sort()
    ans = 0
    start = 0
    for i in range(M-1):
        if i not in ranking[0]:
            ans += dist[i]

    print(ans)


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

Fixed submission:
a = list(map(int,input().split()))
ans = "No"

if a[0] == a[1]:
  if a[0] != a[2]:
   	ans = "Yes"
else:
  if a[0] == a[2] or a[1] == a[2]:
    ans = "Yes"
    
print(ans)

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
ans = "No"
 
if a[0] == a[1]:
  a[0] != a[2]:
   	ans = "Yes"
else:
  a[0] == a[2]:
    ans = "Yes"
    
print(ans)
Problem p02829 (python)

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

if A == 1:
    if B == 2:
        print(3)
    if B == 3:
        print(2)

if A == 2:
    if B == 1:
        print(3)
    if B == 3:
        print(1)

if A == 3:
    if B == 1:
        print(2)
    if B == 2:
        print(1)

Buggy submission (verdict: Runtime Error):
N = int(input())
S,T = input().split()
a =""

for i in range(N):
  a += S[i] + T[i]
  
print(a)

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

if A = 1:
    if B = 2:
        print(3)
    else if B = 3:
        print(2)

if A = 2:
    if B = 1:
        print(3)
    if B = 3:
        print(1)

if A = 3:
    if B = 1:
        print(2)
    if B = 2:
        print(1)
Problem p02835 (python)

Fixed submission:
#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
#値の入力
A1 = int(input())
A2 = int(input())
A3 = int(input())

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#入力値の判定
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")
Problem p02759 (python)

Fixed submission:
N = int(input())

print((N + 1) // 2)

Buggy submission (verdict: Runtime Error):
n = int(input())
print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
n = int(input())
print(math.ceil(n/2))
Problem p02759 (python)

Fixed submission:
N = int(input())
print(round((N/2)+0.01))

Buggy submission (verdict: Runtime Error):
N = input()
print(round((N/2)+0.01))

Buggy submission (verdict: Runtime Error):
print(round((N/2)+0.01))

Buggy submission (verdict: Runtime Error):
print(round(N/2+0.01))

Buggy submission (verdict: Runtime Error):
print(N)
Problem p02759 (python)

Fixed submission:
import math

def func(N):
    ans = math.floor(N / 2) + 1 if N % 2 else math.floor(N / 2)
    return ans
  
  
N = int(input())

print(func(N))

Buggy submission (verdict: Runtime Error):
import math

print(math.floor(N / 2) + 1 if N % 2 else math.floor(N / 2))
Problem p02759 (python)

Fixed submission:
n = int(input())
print((n+1)//2)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n % 2 != 0:
  print(n/2+1)
 else:
  print(n/2)
Problem p02759 (python)

Fixed submission:
num=int(input())
a=int(num/2)
b=int(num%2)
if b==1:
	a=int(a)+1    
print(a)

Buggy submission (verdict: Runtime Error):
num=int(input())
i=0
while num=>2*int(i):
	i=i+1
print(i)
Problem p02759 (python)

Fixed submission:
#!/usr/bin/env python

import math

n = int(input())
print(math.ceil(n/2))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python

n, m = input().split(" ")
n = int(n)
m = int(m)
s_len = []
c_len = []
dig = 10**(n-1)

for i in range(m):
    tmp = input().split(" ")
    s_len.append(int(tmp[0]))
    c_len.append(int(tmp[1]))

c_t = 0
for i in c_len:
    c_t += int(i)

for i in range(dig-1, dig*10):
    flag = False
    for j,s in enumerate(s_len):
        if str(i)[s-1] != str(c_len[j]) and flag == False:
            flag = True
            break
    if flag==False:
        print(i)
        exit()

print("-1")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python

def func():
    n,m = [int(i) for i in input().split(" ")]
    pibot = 10**(m-1)
    dic = {}

    for i in range(m):
        tmp = [int(i) for i in input().split(" ")]

        if tmp[0] not in dic.keys():
            dic[tmp[0]] = tmp[1]
        else:
            if dic[tmp[0]] != tmp[1]:
                print("-1")
                return

    a = [0] * m
    for key in dic.keys():
        a[key-1] = dic[key]

    tmp_s = ""
    for i in a:
        tmp_s += str(i)

    if int(tmp_s) < pibot:
        tmp_s = "-1"

    print(tmp_s)

if __name__ == "__main__":
    func()
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())

print(6-a-b)

Buggy submission (verdict: Runtime Error):
n = int(input())
s, t = input().split()

ans = str()
for i in range(n):
    ans += s[i]
    ans += t[i]

print(ans)

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

print(6-a-b)
Problem p02847 (python)

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

s = week.index(s)
print(7-s)

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

s = week.index(s)
print(7-s)
Problem p02859 (python)

Fixed submission:
import math
r = int(input())

print(math.floor(r*r))

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

if a<10 & b<10:
    print(a*b)
else:
    print(-1)
Problem p03631 (python)

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

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == c: print("yes")
else: print("No")