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

Fixed submission:
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
a,b = map(int,input().split())
print(ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
a,b = map(int,input().split())
print(ceil(a+B/2))

Buggy submission (verdict: Runtime Error):
def ceil(n): # ceiling関数
    if n > int(n):
        return(int(n)+1)
    else:
a,b = map(int,input().split())
print(ceil(a+B/2))
Problem p03544 (python)

Fixed submission:
N = int(input())
L = [0]*(N+2)
L[0] = 2
L[1] = 1
if N<=1:
    print(L[N])
else:
    for i in range(2,N+1):
        L[i] = L[i-1]+L[i-2]
    print(L[N])

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [0]*(N+2)
L[0] = 2
L[1] = 1
if N<=2:
    print(L[i-1])
else:
    for i in range(2,N+1):
        L[i] = L[i-1]+L[i-2]
    print(L[N])

Buggy submission (verdict: Runtime Error):
N = int(input())
L = [0]*(N+1)
L[0] = 2
L[1] = 1
if N<=2:
    print(L[i-1])
    exit()
for i in range(2,N+1):
    L[i] = L[i-1]+L[i-2]
print(L[N])
Problem p03545 (python)

Fixed submission:
def n_ary1(l,d): # リストl中の文字でd桁を全列挙(sorted)
    if d == 1:
        return(l)
    ll = n_ary1(l,d-1)
    lll = []
    for i in l:
        for j in ll:
            lll.append(i+j)
            #lll.append(int(i+j)) ## n進数の場合
    return(lll)
In = list(input())
In = [int(i) for i in In]
op = n_ary1([[0],[1]],3)

for i in op:
    s = In[0]
    for j in range(3):
        if i[j]:
            s += In[j+1]
        else:
            s -= In[j+1]
    if s == 7:
        ansl = i
        break


ans = str(In[0])
for i in range(3):
    if ansl[i] :
        ans = ans + '+' + str(In[i+1])
    else:
        ans = ans + '-' + str(In[i+1])
ans = ans + '=7'
print(ans)

Buggy submission (verdict: Runtime Error):
def n_ary1(l,d): # リストl中の文字でd桁を全列挙(sorted)
    if d == 1:
        return(l)
    ll = n_ary1(l,d-1)
    lll = []
    for i in l:
        for j in ll:
            lll.append(i+j)
            #lll.append(int(i+j)) ## n進数の場合
    return(lll)
In = list(map(int,input().split()))
op = n_ary1([[0],[1]],3)

for i in op:
    s = In[0]
    for j in range(3):
        if i[j]:
            s += In[j+1]
        else:
            s -= In[j+1]
    if s == 7:
        ansl = i
        break


ans = str(In[0])
for i in range(3):
    if ansl[i] :
        ans = ans + '+' + str(In[i+1])
    else:
        ans = ans + '-' + str(In[i+1])
ans = ans + '=7'
print(ans)
Problem p03547 (python)

Fixed submission:
x,y = input().split()
if ord(x)<ord(y):
    print('<')
elif ord(x) == ord(y):
    print('=')
else:
    print('>')

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if ord(x)<ord(y):
    print('<')
elif ord(x) == ord(y):
    print('=')
else:
    print('>')
Problem p03555 (python)

Fixed submission:
C = [list(input()) for i in range(2)]
if C[0][0] == C[1][2] and C[1][0] == C[0][2] and C[0][1] == C[1][1]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
C = [list(input().split()) for i in range(2)]
if C[0][0] == C[1][2] and C[1][0] == C[0][2] and C[0][1] == C[1][1]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
C = [list(map(int,input().split())) for i in range(2)]
if C[0][0] == C[1][2] and C[1][0] == C[0][2] and C[0][1] == C[1][1]:
    print('YES')
else:
    print('NO')
Problem p03583 (python)

Fixed submission:
N = int(input())
flag = True
for h in range(1,3501):
    for n in range(1,3501):
        if 4*h*n-N*(n+h) <= 0:
            continue
        if N*h*n < (4*h*n-N*(n+h)):
            continue
        if flag and (N*n*h) % (4*h*n-N*(n+h)) == 0:
            print(str(h)+' '+str(N*n*h //(4*h*n-N*(n+h)))+' '+str(n))
            flag = False
        if not flag:
            break
    if not flag:
        break

Buggy submission (verdict: Runtime Error):
N = int(input())
flag = True
for h in range(1,3501):
    for n in range(1,3501):
        if flag and (N*n*h) % (4*h*n-N*(n+h)) == 0:
            print(str(h)+' '+str(N*n*h // (4*h*n+N*(n+h)))+' '+str(n))
            flag = False
        if not flag:
            break
    if not flag:
        break
Problem p03599 (python)

Fixed submission:
A,B,C,D,E,F = map(int,input().split())
concent = 0
ans = []
for one in range(F//(100*A)+1):
    for two in range((F-100*A*one)//(100*B)+1):
        for three in range((F-100*A*one-100*B*two)//C+1):
            for four in range((F-100*A*one-100*B*two-C*three)//D+1):
                water = 100*A*one+100*B*two
                sugar = C*three+D*four
                all = water + sugar
                if all == 0:
                    continue
                if E*water//100 < sugar or all > F:
                    continue
                if concent < 100*sugar/all:
                    concent = 100*sugar/all
                    ans = [all,sugar]
if len(ans) == 0:
    print(str(100*A)+' '+str(0))
else:
    print(str(ans[0])+' '+str(ans[1]))

Buggy submission (verdict: Runtime Error):
A,B,C,D,E,F = map(int,input().split())
concent = 0
ans = []
for one in range(F//(100*A)+1):
    for two in range((F-100*A*one)//(100*B)+1):
        for three in range((F-100*A*one-100*B*two)//C+1):
            for four in range((F-100*A*one-100*B*two-C*three)//D+1):
                water = 100*A*one+100*B*two
                sugar = C*three+D*four
                all = water + sugar
                if all == 0:
                    continue
                if E*water//100 < sugar or all > F:
                    continue
                if concent < 100*sugar/all:
                    concent = 100*sugar/all
                    ans = [all,sugar]
print(str(ans[0])+' '+str(ans[1]))
Problem p03645 (python)

Fixed submission:
N,M = map(int,input().split())
one = []
nnn = []
for i in range(M):
    ai,bi = map(int,input().split())
    if ai == 1:
        one.append(bi)
    if bi == N:
        nnn.append(ai)
def bs_left(l, target): # l=sorted, target以上の値をもつ要素のうち一番左のindexを返す
    low, high = 0, len(l)
    while low < high:
        mid = (low+high)//2
        if l[mid] < target:
            low = mid+1
        else:
            high = mid
    if low == len(l):
        return -1
    return low
flag = False
if len(one) == 0 or len(nnn) == 0:
    pass
else:
    nnn.sort()
    for i in range(len(one)):
        if nnn[bs_left(nnn,one[i])] == one[i]:
            flag = True
            break

if flag:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
one = []
nnn = []
for i in range(M):
    ai,bi = map(int,input().split())
    if ai == 1:
        one.append(bi)
    if bi == N:
        nnn.append(ai)
def bs_left(l, target): # l=sorted, target以上の値をもつ要素のうち一番左のindexを返す
    low, high = 0, len(l)
    while low < high:
        mid = (low+high)//2
        if l[mid] < target:
            low = mid+1
        else:
            high = mid
    return low
flag = False
if len(one) == 0 or len(nnn) == 0:
    pass
else:
    nnn.sort()
    for i in range(len(one)):
        if nnn[bs_left(nnn,one[i])] == one[i]:
            flag = True
            break

if flag:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
Problem p03699 (python)

Fixed submission:
N = int(input())
s = [int(input()) for i in range(N)]
ss = sum(s)
m = 101
for i in range(N):
    if s[i] % 10 != 0 and s[i] < m:
        m = s[i]
if m == 101:
    print(0)
elif ss % 10 == 0:
    print(ss-m)
else:
    print(ss)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = list(map(int,input().split()))
ss = sum(s)
m = 101
for i in range(N):
    if s[i] % 10 != 0 and s[i] < m:
        m = s[i]
if m == 101: print(0)
elif ss % 10 == 0: print(ss-m)
else: print(ss)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = list(map(int,input().split()))
ss = sum(s)
m = 101
for i in range(N):
    if s[i] % 10 != 0 and s[i] < m: m = s[i]
if m == 101: print(0)
elif ss % 10 == 0: print(ss-m)
else: print(ss)
Problem p03713 (python)

Fixed submission:
H,W = map(int,input().split())
a = H%2
b = W%2
ans = 10**9
if H%3==0 or W%3==0:
    print(0)
elif H==1 or W==1:
    print(1)
else:
    for i in range(1,W):
        c = (H*i,H//2*(W-i),H*W-H*i-(H//2)*(W-i))
        ans = min(ans,max(c)-min(c))
        c = (H*i,(W-i)//2*H,H*W-H*i-(W-i)//2*H)
        ans = min(ans,max(c)-min(c))
    for i in range(1,H):
        c = (W*i,W//2*(H-i),H*W-W*i-(W//2)*(H-i))
        ans = min(ans,max(c)-min(c))
        c = (W*i,(H-i)//2*W,H*W-W*i-(H-i)//2*W)
        ans = min(ans,max(c)-min(c))
    
    print(ans)

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
a = H%2
b = W%2
ans = 10**9
if H%3==0 or W%3==0:
    print(0)
elif H==1 or W==1:
    print(1)
else:
    for i in range(1,W):
        c = (H*i,H//2*(W-i),H*W-H*i-(H//2)*(W-i))
        ans = min(ans,max(c)-min(c))
    for i in range(1,H):
        c = (W*i,W//2*(H-i),H*W-W*i-(W//2)*(H-i))
        ans = min(ans,max(c)-min(c))
    d = (H*(W//3),(H*W-H*(W//3))//2,H*W-H*(W//3)-(H*W-H*(W//3))//2)
    e = (W*(H//3),(H*W-W*(H//3))//2),H*W-W*(H//3),(H*W-W*(H//3))//2)
    ans = min(ans,max(d)-min(d))
    ans = min(ans,max(e)-min(e))
    print(ans)
Problem p03738 (python)

Fixed submission:
A=int(input())
B = int(input())
if A>B:
    print('GREATER')
elif A<B:
    print('LESS')
else:
    print('EQUAL')

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A>B:
    print('GREATER')
elif A<B:
    print('LESS')
else:
    print('EQUAL')
Problem p03739 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
trueans = float('inf')
for k in [-1,1]:
    sign = k
    ans = 0
    s = 0
    for i in range(n):
        s += a[i]
        if s == 0:
            s = sign
            ans += 1
        elif s//abs(s) == sign:
            pass
        else:
            ans += abs(sign-s)
            s = sign
        sign *= -1
    trueans = min(ans,trueans)
print(trueans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
s = 0
sign = a[0]//abs(a[0])
ans = 0
for i in range(n):
    s += a[i]
    if s == 0:
        s = sign
        ans += 1
    
    elif s//abs(s) == sign:
        pass
    else:
        ans += abs(sign-s)
        s = sign
    sign *= -1
print(ans)
Problem p03760 (python)

Fixed submission:
O = input()
E = input()

ans = ''

if len(O)==len(E):
    for i in range(len(O)):
        ans=ans+O[i]
        ans=ans+E[i]
else:
    for i in range(len(O)-1):
        ans=ans+O[i]
        ans=ans+E[i]
    ans=ans+O[len(O)-1]


print(ans)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()

ans = ''
for i in range(len(O)+len(E)):
    if i%2==0:
        ans = ans+O[i]
    else:
        ans = ans+E[i//2]
print(ans)
Problem p03838 (python)

Fixed submission:
x,y = map(int,input().split())
if x == 0 and y > 0:
    print(y-x)
elif x == 0 and y < 0:
    print(1+abs(x+y))
elif y == 0 and x > 0:
    print(1+abs(x+y))
elif y == 0 and x < 0:
    print(y-x)
elif x < 0 and y < x:
    print(2+abs(x-y))
elif 0 < x and x < y:
    print(y-x)
elif 0 < y and x > y:
    print(2+abs(x-y))
elif 0 > y and x > y:
    print(abs(y+x)+1)
elif x < 0 and y > 0:
    print(abs(y+x)+1)
elif y < 0 and x < y:
    print(y-x)

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x == 0 and y > 0:
    print(y-x)
elif x == 0 and y < 0:
    print(1+abs(x+y))
elif y == 0 and x > 0:
    print(1+abs(x+y))
elif y == 0 and x < 0:
    print(y-x)
    
elif 0 < x and x < y:
    print(y-x)
elif 0 < x and x > y:
    #print(abs(y+x)+1)
elif x < 0 and y > 0:
    print(abs(y+x)+1)
elif y < 0 and x < y:
    print(y-x)
elif x < 0 and y < x:
    print(2+abs(x-y))

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
if x == 0 and y > 0:
    print(y-x)
elif x == 0 and y < 0:
    print(1+abs(x+y))
elif y == 0 and x > 0:
    print(1+abs(x+y))
elif y == 0 and x < 0:
    print(y-x)
    
elif 0 < x and x < y:
    print(y-x)
elif 0 < x and x > y:
    print(abs(y+x)+1)
elif x < 0 and y > 0 
    print(abs(y+x)+1)
elif y < 0 and x < y:
    print(y-x)
elif x < 0 and y < x:
    print(2+abs(x-y))
Problem p03992 (python)

Fixed submission:
s = input()
print(s[:4]+' '+s[4:])

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(N):
    if a[a[i]-1]-1 == i:
        ans += 1
print(ans//2)
Problem p02684 (python)

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
 
for i in range(N):
  A[i] -= 1

loop_lis = [0]
visited = [-1 for _ in range(N)]
visited[0] = 0
flag = 0
for i in range(K):
  if visited[A[loop_lis[-1]]] != -1:
    loop_time = i+1-visited[A[loop_lis[-1]]]
    start_loop = visited[A[loop_lis[-1]]]
    flag = 1
    break
  visited[A[loop_lis[-1]]] = i+1
  loop_lis.append(A[loop_lis[-1]])

if i == K-1 and flag == 0:
  print(loop_lis[-1]+1)
else:
  print(loop_lis[start_loop+(K-start_loop)%loop_time]+1)

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

loop_lis = [1]
visited = [0 for _ in range(N)]
visited[0] = 1
loop_time = 0
start_loop = 0
for i in range(K):
  if visited[A[loop_lis[-1]-1]-1] != 0:
    loop_time = (i+1)-(visited[A[loop_lis[-1]-1]-1])
    start_loop = i+1 - loop_time
    break
  visited[A[loop_lis[-1]-1]-1] = i+1
  loop_lis.append(A[loop_lis[-1]-1])
print(loop_lis[start_loop+(K-start_loop)%loop_time])
Problem p02696 (python)

Fixed submission:
import math
A, B, N = map(int, input().split())

if (B == 1):
  print(0)
elif (B > N+1):
  x = N
  print((A*x)//B-A*(x//B))
else:
  x = N-N%(B-1)
  print((A*x)//B-A*(x//B))

Buggy submission (verdict: Runtime Error):
import math
A, B, N = map(int, input().split())

if (B > N+1):
  x = N
  print((A*x)//B-A*(x//B))
else:
  x = N-N%(B-1)
  print((A*x)//B-A*(x//B))

Buggy submission (verdict: Runtime Error):
import math
A, B, N = map(int, input().split())

if (B > N+1):
  x = N
  print(math.floor(A*x/B)-A*math.floor(x/B))
else:
  x = N-N%(B-1)
  print(math.floor(A*x/B)-A*math.floor(x/B))

Buggy submission (verdict: Runtime Error):
import numpy as np
A, B, N = map(int, input().split())

x = np.arange(1, max(10**6,N+1))
print(int(np.max(np.floor(A*x/B)-A*np.floor(x/B))))
Problem p02717 (python)

Fixed submission:
X, Y, Z = map(int, input().split())

print(Z, X, Y)

Buggy submission (verdict: Runtime Error):
import math
 
N = int(input())
 
cnt = 0
 
if N == 2:
  print(1)
  exit()
 
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
 
    # divisors.sort()
    return divisors
res1 = sorted(make_divisors(N))
res1 = res1[1:math.ceil(len(res1)/2)]
 
for num in res1:
  kensa = N
  while True:
    if kensa % num == 0:
      kensa = kensa // num
      continue
    break
  if kensa % num == 1:
    cnt += 1
 
res2 = sorted(make_divisors(N-1))
cnt += len(res2[1:])+1
 
print(cnt)
Problem p02969 (python)

Fixed submission:
r = int(input())

print(3 * r ** 2)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = []
a = list(map(int,input().split()))
 
b = [0]*N
for i in reversed(range(N)):
    j = i + 1
    buf = b[i::j]
    if (sum(buf) % 2) != a[i]:
        b[i] = 1
print(sum(b))
bb = [i+1 for i in range(N) if b[i] == 1]
if sum(b) != 0:
    print(' '.join(map(str, bb)))
Problem p02971 (python)

Fixed submission:
N = int(input())
A = [int(input()) for _ in range(N)]
B = sorted(A, reverse=True)

for i in range(N):
    if A[i] < B[0]:
        print(B[0])
    else:
        print(B[1])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(input) for _ in range(N)]
B = sorted(A, reverse=True)

for i in range(N):
    if A[i] <= B[0]:
        print(B[0])
    else:
        print(B[1])
Problem p02999 (python)

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

if N < K:
  print(0)
else:
  print(10)

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

i = 0
count = 0
while i < N:
  for j in range(N-i):
    if sum(a[j:j+1+i]) >= K:
      count += 1
  i += 1
  
print(count)
Problem p03067 (python)

Fixed submission:
A, B, C = list(map(int, input().split()))

D = max([A, B])
E = min([A, B])
if E <= C <= D:
  print("Yes")
else:
  print("No")

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

count_1 = 0
count_2 = 0
for i in range(N-1):
  if S[i] == "#" and S[i+1] == ".":
    count_1 += 1
for i in range(N-1):
  if S[N - i - 1] == "." and S[N - i - 2] == "#":
    count_2 += 1
    
print(min(count_1, count_2))
Problem p03071 (python)

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

if a >= b:
    count = a
    a -= 1
else:
    count = b
    b -= 1

if a >= b:
    count += a
else:
    count += b
    
print(count)

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

print(180*(N-2))
Problem p03433 (python)

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

if (N % 500) <= A:
  print("Yes")
else:
  print("No")

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

alice_count = 0
bob_count = 0
for i in range(N//2):
  alice_count += max(a)
  a.pop(a.index(max(a)))
  bob_count += max(a)
  a.pop(a.index(max(a)))

if a:
  alice_count += a[0]
  
count = alice_count - bob_count

print(count)
Problem p03713 (python)

Fixed submission:
def threeArea(w, h, ans):
  for i in range(1, h):
    recA = w * i
    width = w//2
    recB = (h-i) * width
    recC = w * h - recA - recB
    diff = max(recA, recB, recC) - min(recA, recB, recC)
    
    height = (h - i) //2
    recB = w * height
    recC = w * h - recA - recB
    diff = min(diff, max(recA, recB, recC) - min(recA, recB, recC))
    if ans > diff:
      ans = diff
  return ans

H, W = (int(i) for i in input().split())
 
ans = float('inf')
ans = threeArea(W, H, ans)
ans = threeArea(H, W, ans)
 
print(ans)

Buggy submission (verdict: Runtime Error):
def threeArea(w, h, ans):
  for i in range(1, h):
    recA = w * i
    width = w//2
    recB = (h-i) * width
    recC = w * h - recA - recB
    diff = max(recA, recB, recC) - min(recA, recB, recC)
 
	height = (h - i) //2
    recB = w * height
    recC = w * h - recA - recB
    diff = min(diff, max(recA, recB, recC) - min(recA, recB, recC))
    if ans > diff:
      ans = diff
  return ans

H, W = (int(i) for i in input().split())
 
ans = float('inf')
ans = threeArea(W, H, ans)
ans = threeArea(H, W, ans)
 
print(ans)
Problem p03101 (python)

Fixed submission:
h_all, w_all = map(int, input().split())
h_b, w_b = map(int, input().split())
 
print((h_all - h_b) * (w_all - w_b))

Buggy submission (verdict: Runtime Error):
h_all, w_all = map(int, input().split)
h_b, w_b = map(int, input().split)

print((h_all - h_b) * (w_all - w_b))
Problem p02618 (python)

Fixed submission:
from random import randint

n = int(input())

for i in range(n):
  print(randint(1,26))

Buggy submission (verdict: Runtime Error):
n = int(input())
list_c = list(map(int,input().split()))
list_d = []

for i in range(n):
  list_d.append(list(map(int,input().split())))

now = [0]*26

max_happy = 0
index_max = -1

for day in range(1,n+1):
  max_happy = 0
  index_max = -1
  for i in range(n):
    score = list_d[day-1][i] - (day - now[i]) * list_c[i]
    if score > max_happy:
      index_max = i
      max_happy = score
  
  print(index_max+1)
Problem p02927 (python)

Fixed submission:
m,d = map(int,input().split())
count = 0
for month in range(1,m+1):
  for day in range(1,d+1):
    if (day%10) >= 2 and (day//10) >= 2:
      if (day%10)*(day//10) == month:
        #print(month,day)
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
m,d = map(int(input().split()))
count = 0
for month in range(1,m+1):
  for day in range(1,d):
    if (day%10) >= 2 and (day//10) >= 2:
      if (day%10)*(day//10) == m:
        count += 1
print(count)
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
sight = 2*d+1
print((n//sight) + (n%sight != 0))
Problem p03105 (python)

Fixed submission:
a,b,c = map(int,input().split())
if a*c < b:
  print(c)
else:
  print(b//a)

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
lis = []
for i in range(1,min(a,b)+1):
  if a%i == 0 and b%i == 0:
    lis.append(i)
print(lis[-1*c])

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input(),split())
if a*c < b:
  print(c)
else:
  print(b//a)
Problem p03109 (python)

Fixed submission:
lis = list(map(int,input().split("/")))
if lis[1] <= 4:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
lis = list(input().split("/"))
if lis[1] <= 4:
  print("Heisei")
else:
  print("TBD")
Problem p03130 (python)

Fixed submission:
lis = [0,0,0,0]
for _ in range(3):
  n,m = list(map(int,input().split()))
  lis[n-1] += 1
  lis[m-1] += 1
if 3 in lis:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
lis = [0,0,0,0]
for n,m in lis(map(int,input().split())):
  lis[n-1] += 1
  lis[m-1] += 1
if 3 in lis:
  print("NO")
else:
  print("YES")
Problem p03478 (python)

Fixed submission:
N,A,B = list(map(int,input().split()))
s = 0
for i in range(1,N+1):
  lis = list(map(int,list(str(i))))
  if A <= sum(lis) and sum(lis) <= B:
    s += i
print (s)

Buggy submission (verdict: Runtime Error):
N,A,B = list(map(int,input().split()))
s = 0
for i in range(1,N+1):
  lis = list(str(i))
  if A <= sum(lis) and sum(lis) <= B:
    s += i
print (s)
Problem p03493 (python)

Fixed submission:
lis = list(input())
count = 0
for item in lis:
    if item == "1":
        count += 1
print (count)

Buggy submission (verdict: Runtime Error):
M = input()
lis =list(str(M))
count = 0
for item in lis:
  if item == ‘1’:
    count += 1
print (count)

Buggy submission (verdict: Runtime Error):
M = input()
lis =list(M)
count = 0
for item in lis:
  if item == ‘1’:
    count += 1
print (count)
Problem p03543 (python)

Fixed submission:
N = int(raw_input())
lis = map(int, list(str(N)))
if lis[1] == lis[2] and (lis[0] == lis[1] or lis[2] == lis[3]) :
    print "Yes"
else:
  print "No"

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
lis = [None]*86
lis[0] = 2
lis[1] = 1
for i in xrange(84):
	lis[i+2] = lis[i+1] + lis[i]
print lis[N]
Problem p03544 (python)

Fixed submission:
N = int(raw_input())
lis = [None]*87
lis[0] = 2
lis[1] = 1
for i in xrange(85):
	lis[i+2] = lis[i+1] + lis[i]
print lis[N]

Buggy submission (verdict: Runtime Error):
N = int(raw_input())
lis = [None]*86
lis[0] = 2
lis[1] = 1
for i in xrange(84):
	lis[i+2] = lis[i-1] + lis[i]
print lis[N-1]
Problem p03697 (python)

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

Buggy submission (verdict: Runtime Error):
N=int(raw_input())
lis = []
for i in range(0,N):
	lis.append(int(raw_input()))
if sum(lis) % 0 == 0:
	print sum(lis)-min(lis)
else:
	print sum(lis)

Buggy submission (verdict: Runtime Error):
S = raw_input()
lis = list(S)
for i in lis:
	mat = []
	if i in S
		print "no"
		break
	mat.add(i)
else:
	print "yes"
Problem p03698 (python)

Fixed submission:
S = raw_input()
lis = list(S)
mat = []
for i in lis:
	if i in mat:
		print "no"
		break
	mat.append(i)
else:
	print "yes"

Buggy submission (verdict: Runtime Error):
S = raw_input()
lis = list(S)
for i in lis:
	mat = []
	if i in S:
		print "no"
		break
	mat.append(i)
	else:
		print "yes"

Buggy submission (verdict: Runtime Error):
S = raw_input()
lis = list(S)
for i in lis:
	mat = []
	if i in S
		print "no"
		break
	mat.append(i)
else:
	print "yes"

Buggy submission (verdict: Runtime Error):
S = raw_input()
lis = list(S)
for i in lis:
	mat = []
	if i in S
		print "no"
		break
	mat.add(i)
else:
	print "yes"

Buggy submission (verdict: Runtime Error):
S = raw_input()
mat = []
lis = list(S)
for i in lis:
	if i in S
		print "no"
		break
	mat.add(i)
else:
	print "yes"