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

Fixed submission:
# At Beginner Contest 042 B (200)
n, l = map(int, input().split())
S = []
for _ in range(n):
    S.append(input())

out = []
min_ = float("inf")
min_idxs = list(range(len(S)))
pos = 0
while S:
    new_min = []
    for i in min_idxs:
        s = S[i]
        ch = ord(s[pos])
        if ch < min_:
            min_ = ord(s[pos])
            new_min = [ i ]
        elif ch == min_:
            new_min.append(i)
    if len(new_min) == 1 or pos == l - 1:
        for i in range(len(new_min)):
            out.append(S[new_min[i]])
        for i in range(len(new_min) - 1, -1, -1):
            del S[new_min[i]]
        min_idxs = list(range(len(S)))
        pos = 0
    else:
        pos += 1
        min_idxs = new_min
    min_ = float("inf")

r = "".join(out)
print(r)

Buggy submission (verdict: Runtime Error):
# At Beginner Contest 042 B (200)
n, l = map(int, input().split())
S = []
for _ in range(n):
    S.append(input())

out = []
min_ = float("inf")
min_idxs = list(range(len(S)))
pos = 0
while S:
    new_min = []
    for i in min_idxs:
        s = S[i]
        ch = ord(s[pos])
        if ch < min_:
            min_ = ord(s[pos])
            new_min = [ i ]
        elif ch == min_:
            new_min.append(i)
    if len(new_min) == 1:
        out.append(S[new_min[0]])
        del S[new_min[0]]
        min_idxs = list(range(len(S)))
        pos = 0
    else:
        pos += 1
        min_idxs = new_min
    min_ = float("inf")

r = "".join(out)
print(r)
Problem p02789 (python)

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

if(N == M):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
# 整数の入力
A = int(input())
cnt = 0
for i in range(1, A):
  for j in range(1, A):
    x = str(i)
    y = str(j)

    first_x = x[0]
    last_x = x[-1]
    first_y = y[0]
    last_y = y[-1]
    
    if(first_x ==  last_y and last_x == first_y):
      cnt = cnt + 1
      continue
      
print(cnt)

Buggy submission (verdict: Runtime Error):
if(N == M):
  print('YES')
else:
  print('No')
Problem p02789 (python)

Fixed submission:
N, M = map(int, input().split())
if M<N:
  print("No")
else:
  print("Yes")

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

ans = 0
for i in range(N):
  isOK = True
  for j in range(i):
    if P[i] > P[j]:
      isOK = False
      break
  if isOK:
    ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
if m<n:
  print("No")
 else:
 	print("Yes")
Problem p02789 (python)

Fixed submission:
S = input()
S = S.split(" ")
N = S[0]
M = S[1]

if N == M :
    print ("Yes")
else :
    print ("No")

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

if N == M :
    print ("Yes")
else :
    print ("No")

Buggy submission (verdict: Runtime Error):
if N == M :
    print ("Yes")
else :
    print ("No")
Problem p02817 (python)

Fixed submission:
s, t = input().split()
print("{}{}".format(t,s))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
print("{}{}".format(t,s))
Problem p02818 (python)

Fixed submission:
a, b, k = map(int, input().split())
if a >= k:
  print(a-k, b)
elif k-a <= b:
  print(0, b-k+a)
else:
  print(0, 0)

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
for i in range(k):
  if a > 0:
    a = a - 1
  elif b > 0:
    b = b - 1
  else:
    none
print(a, b)
Problem p02981 (python)

Fixed submission:
N,A,B=(int(i) for i in input().split())

a=N*A
b=B

if a<=b:
  print(a)
else:
  print(b)

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

a=N*A
b=B
if N*A<=B:
	print(a)
else:
	print(b)
Problem p02789 (python)

Fixed submission:
i,j = map(int, input().split())

if i == j:
  print("Yes")
else:
  print("No")

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

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

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

if i[0] == i[1]:
  print("Yes")
else:
  print("No")
Problem p02791 (python)

Fixed submission:
n=int(input())
plist = list(map(int,input().split()))
cnt = 0
pmax=plist[0]
for i in range(n):
    if plist[i]<=pmax:
        pmax=plist[i]
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
def code(n,p):
    flg = 1

    for idx in range(1,n):
        if min(p[0:idx]) >= p[idx]:
            flg+=1
            print(p[idx])
    return flg

idx = code(n,p)
if idx == None:
    print(n)
else:
    print(idx)

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

def code(n,p)
  for idx, pp in enumerate(p):
    if pp>n:
      return idx

idx = code(n,p)
print(idx)
Problem p03085 (python)

Fixed submission:
if __name__ == "__main__":
    first = {'A','T'}
    second = {'C','G'}

    N = input()

    for x in [first,second]:
        if len(x - {N}) == 1:
            print(list(x-{N})[0])

Buggy submission (verdict: Runtime Error):
if __name__ == "__main__":
    NQ = input().split(" ")
    N ,Q = int(NQ[0]),int(NQ[1])

    S = input()
    stack =[]
    for x in range(Q):
        lr = input()
        lr = lr.split(" ")
        l ,r = int(lr[0]),int(lr[1])
        target = S[l-1:r]
        num = target.split("AC")
        stack.append(num)
    for x in [len(y)-1 for y in stack]:
        print(x)
Problem p02789 (python)

Fixed submission:
a=raw_input()
m=a.split()
N,M=map(int,m)
if N==M:
  print 'Yes'
else:
  print 'No'

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

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

Buggy submission (verdict: Runtime Error):
a=input()
m=a.split()
N=int(m[0])
M=int(m[2])
if N==M:
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
a=input()
m=a.split()
N=int(m[0])
M=int(m[1])
if N==M:
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
a=input()
m=a.split()
N=m[0]
M=m[1]
if M==N:
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
N=input()
M=input()
if N==M:
  print 'Yes'
else:
  print 'No'

Buggy submission (verdict: Runtime Error):
if N==M:
  print 'Yes'
else:
  print 'No'
Problem p02789 (python)

Fixed submission:
inp1 = input().split()
a = int(inp1[0])
b = int(inp1[1])

if b ==0:
  print("No")
else:
  c = a%b
  if c == 0:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
m = input().split()
ppp = list(map(int, m))
max = 2*10**5+1
ans = 0
for p in ppp:
    if p < max:
        ans += 1
        max = p
print(ans)

Buggy submission (verdict: Runtime Error):
inp1 = input().split()
inp2 = input().split()
a = int(inp1[0])
b = inp2
b = [int(s) for s in inp2]
ansno = a
maxno = b[0]

ii = 0
for i in b:
  if ii ==0:
    ii+=1
    continue
  bslice = b[:ii+1]
#  print(ii)
#  print(bslice)
  if min(bslice) != i:
#    print("min(bslice)",min(bslice)," i ",i)
    ansno -=1
  ii+=1
#  print("ansno: ",ansno)
print(ansno)

Buggy submission (verdict: Runtime Error):
inp1 = input().split()
inp2 = input().split()
a = int(inp1[0])
b = inp2
b = [int(s) for s in inp2]
ansno = a
maxno = b[0]

ii = 0
for i in b:
  if i ==0:
    continue
  if maxno < i:
    maxno = i
    ansno -= 1
    continue
  bslice = b[:ii]
  b[:ii].sort(reverse=True)
  bsort = b[:ii]
  if bslice != bsort:
    ansno -=1
    print(bslice,bsort)
    print("sort")
  ii+=1
print(ansno)

Buggy submission (verdict: Runtime Error):
inp1 = input().split()
a = int(inp1[0])
b = int(inp1[1])

c = a%b
if c == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
inp1 = input().split()
a = int(inp1[0])
b = int(inp1[1])

c = a%b
if c == 0:
  print("Yes")
else:
  print("No")
Problem p02791 (python)

Fixed submission:
n = int(input())
m = input().split()
ppp = list(map(int, m))
max = 2*10**5+1
ans = 0
for p in ppp:
    if p < max:
        ans += 1
        max = p
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
inp1 = input()
inp2 = input().split()

a = int(inp1)
b = np.array(inp2).astype(int)
ansno = a

for ii,i in enumerate(b):
  bslice = b[:ii+1]
  minb = np.min(bslice)
  if minb == i:
    pass
  else:
    ansno -=1

print(ansno)

Buggy submission (verdict: Runtime Error):
import numpy as np
inp1 = input().split()
inp2 = input().split()

a = int(inp1[0])
b = np.array(inp2).astype(int)
ansno = a
maxno = b[0]

ii = 0
for i in b:
  bslice = b[:ii+1]
  if min(bslice) != i:
    ansno -=1
  ii+=1
print(ansno)
Problem p02789 (python)

Fixed submission:
x,y=map(int,input().split())
if(x==y):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x,y=map(int(),input().split())
if(x==y):
  print("Yes")
else:
  print("No")
Problem p02791 (python)

Fixed submission:
n=int(input())
li = list(map(int,input().split()))
count=1
m=n
for i in range(1,n):
    m=min(m,li[i-1])
    if(m==1):
        break
    if(m>=li[i]):
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
n=int(input())
li = list(map(int,input().split()))
count=1
li2=[]
if(len(li)!=1):
    for i in range(1,n):
        if(i==1):
            if(li[0]>=li[1]):
                count+=1
            continue
        li2=li[0,i-1]
        if(max(li2)>=li[i]):
            count+=1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
li = list(map(int,input().split()))
count=1
li2=[]
for i in range(1,n):
  li2=li[0,i-1]
  if(max(li2)>=li[i]):
    count+=1
print(count)
Problem p02789 (python)

Fixed submission:
txt = input().split(' ')
if txt[0] == txt[1]:
  print('Yes')
else:
  print('No')

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

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
ans = sum(tmp//a for a in arr)
ans = ans % (10**9+7)
print(ans)

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

n = int(input())
arr = list(map(int,input().split()))
count = 0
minimum = arr[0]
for num in arr:
  if num <= minimum:
    minimum = num
    count += 1
print(count)
Problem p02789 (python)

Fixed submission:
def main():
  a,b = map(int,input().split())
  ans = check(a,b)
  print(ans)
  
def check(n,m):
  if n == m:
    return "Yes"
  else:
    return "No"
main()

Buggy submission (verdict: Runtime Error):
def main():
    a = input()
    l = list(map(int,input().split()))
    ans = check(int(a),l)
    print(ans)

def check(a,l):
    num = 0
    for i in range(a):
        for j in range(i):
            if l[i] > l[j]:
                break
        else:
            num = num + 1
    return num

main()

Buggy submission (verdict: Runtime Error):
def main():
    a = input()
    #if int(a) > 100000:
    #    exit
    l = list(map(int,input().split()))
    #if len(l) > int(a):
    #    exit
    ans = check(int(a),l)
    print(ans)

def check(a,l):
    num = 0
    for i in range(a):
        for j in range(i):
            if l[i] > l[j]:
                break
        else:
            num = num + 1
    return num

main()

Buggy submission (verdict: Runtime Error):
def main():
  i = list(map(int, input().split()))
  ans = check(i[0],i[1])
  print ans
  
def check(int n, int m):
  if n == m:
    return true
  else:
    return false

Buggy submission (verdict: Runtime Error):
def main():
  n = input()
  m = input()
  ans = check(n,m)
  print ans
  
def check(int n, int m):
  if(n == m):
    return true
  else:
    return false
Problem p02789 (python)

Fixed submission:
n,m=map(int, input().split())

if n==m: print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
from fractions import *
n,*a=map(int,open(0).read().split())
b=1
for i in a:b*=i//gcd(b,i)
print(sum(b//i for i in a)%(10**9+7))
Problem p02789 (python)

Fixed submission:
a,b = map(int,input().split())
if a == b:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
num = list(map(int,input().split()))
count = 0
for _ in range(N):
  if min(num[:_+1]) == num[_]:
    count += 1

print(count)
Problem p03239 (python)

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

min = 1001
for ii in range(N):
  c,t = map(int,input().split())
  if t <= T and min > c:
    min = c
   
if min == 1001:
  print('TLE')
else:
  print(min)

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

min = 1001
for ii in ranga(N):
  c,t = map(int,input().split())
  if t <= T:
    min = c if min > c:
   
if t == 1001:
  print('TLE')
else:
  print(min)

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

min = 1001
for ii in ranga(N):
  c,t = map(int,input().split())
  if t <= T:
    min = t if min > t
   
if t == 1001:
  print('TLE')
else:
  print(min)
Problem p03636 (python)

Fixed submission:
a = input()
print(a[0],len(a)-2,a[-1],sep='')

Buggy submission (verdict: Runtime Error):
a,*b,c = intput()
print(a+str(len(b))+c)
Problem p02789 (python)

Fixed submission:
#coding: utf-8
 
s = input().split()
if s[0]==s[1]:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
#coding: utf-8
 
s = input().split()
if s[0]>s[1]:
  for i in range(s[0]):
  	print(str(s[1]),end='')
else:
  for i in range(s[1]):
  	print(str(s[0]),end='')
Problem p02909 (python)

Fixed submission:
# coding: utf-8

weather = input()
if weather == "Sunny":
    print("Cloudy")
elif weather == "Cloudy":
    print("Rainy")
elif weather == "Rainy":
    print("Sunny")

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

weather = input()
if weather == "Sunny":
    print("Cloudy")
elif wether == "Cloudy":
    print("Rainy")
elif wether == "Rainy":
    print("Sunny")

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

weather = input("Today's weather:")
if weather == "Sunny":
    print("Cloudy")
elif wether == "Cloudy":
    print("Rainy")
elif wether == "Rainy":
    print("Sunny")

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

wether = input("Today's weather:")
if weather == "Sunny":
    print("Cloudy")
elif wether == "Cloudy":
    print("Rainy")
elif wether == "Rainy":
    print("Sunny")
Problem p02789 (python)

Fixed submission:
a=list(map(lambda x:x,input().split()))
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")

Buggy submission (verdict: Runtime Error):
a=list(map(lambda x:x,input(),split()))
if(a[1]>a[0]):
  print(a[0]*int(a[1]))
else:
  print(a[1]*int(a[0]))

Buggy submission (verdict: Runtime Error):
a=list(map(lambda x:x,input().split())
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")

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

Fixed submission:
N = int(input())
S,T = input().split()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = int(input())
S,T= input().spulit()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
T = input()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q

Buggy submission (verdict: Runtime Error):
N = input()
S = input()
T = input()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)

Buggy submission (verdict: Runtime Error):
N = input()
S = input()
T = input()
 
Q = ""
for i in range (N-1):
  Q = Q + S[i] + T[i]
  
print(Q)

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

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

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

Q = ""
for i in range (N-1):
  Q = Q + S[i] + T[i]
  
 print(Q)
Problem p03469 (python)

Fixed submission:
S = input()

L = S.split("/")

L[0] = "2018"

print(L[0]+"/"+L[1]+"/"+L[2])

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

L = S.split("/")

L[0] = "2018"

print(L[0]+"/"L[1]+"/"L[2])

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

L = S.split(/)

L[0] = "2018"

print(L[0]+L[1]+L[2])
Problem p03493 (python)

Fixed submission:
s = list(input())
 
a = 0
 
if s[0] == "1":
  a = a + 1
 
if s[1] == "1":
  a = a + 1
 
if s[2] == "1":
  a = a + 1
  
print(a)

Buggy submission (verdict: Runtime Error):
s = list(input())
 
a = 0
 
if s[0] = 1:
  a + 1
 
if s[1] = 1:
  a + 1
 
if s[2] = 1:
  a + 1
  
print(a)

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


d = 0

if a = 1:
  d + 1

if b = 1:
  d + 1
  
if c = 1:
  d + 1
  
print(d)
Problem p03644 (python)

Fixed submission:
def divisible(n):
 ans = 0
 while n%2 == 0:
  n /= 2
  ans += 1
 return ans
 
N = int(input())
 
b = 0

c = 1
 
for i in range(1,N+1):
    if(divisible(i) > b):
      b = divisible(i)
      c = i
    
print(c)

Buggy submission (verdict: Runtime Error):
ソースコード 

Copy
Copy
def divisible(n):
    ans = 0
    while n%2 == 0:
        n /=2
        ans +=1
    return ans
 
N = int(input())
 
b = 0
 
for i in range(N):
    if(divisible(i) > b):
      b = divisible(i)
      ans = i
    
print(max(ans))
Problem p03693 (python)

Fixed submission:
r,g,b = map(int,input().split())
 
a = 100*r + 10*g + b
 
if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)

Buggy submission (verdict: Runtime Error):
r,g,b = int(input().split())
 
a = 100*r + 10*g + b
 
if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)

Buggy submission (verdict: Runtime Error):
r,g,b = int(input().split)
 
a = 100*r + 10*g + b
 
if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)

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

a = 100*r + 10*g + b

if a%4 == 0:
  m = "YES"
else:
  m = "NO"
  
print(m)
Problem p02812 (python)

Fixed submission:
n = int(input())
s = str(input())
 
ans = 0
 
for i in range(n-2):
    if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
        ans += 1
    else:
        continue
      
print(ans)

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

ans = 0

for i in range(n-2):
    if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
        ans += 1
    else:
        continue
      
print(ans)

Buggy submission (verdict: Runtime Error):
n = inr(input())
s = str(inout())

ans = 0

for i in range(n):
	if s[i] == "A" and s[i+1] == "B" and s[i+2] == "C":
      ans += 1
    else:
      continue
      
print(ans)
Problem p02818 (python)

Fixed submission:
a, b, k = map(int,input().split())
if a >= k:
  print(a-k, b)
elif k-a <= b:
  print(0, b-k+a)
else:
  print(0, 0)

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

Buggy submission (verdict: Runtime Error):
a, b, k = map(int,input().split())
if a < k:
  print(0,(b - k + a), sep=" ")
elif a > k:
  print((a-k),b,sep=" ")
else:
  print(0, 0,sep+" ")
Problem p02909 (python)

Fixed submission:
s = input()
 
if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
else:
  print("Sunny")

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

if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
Problem p02921 (python)

Fixed submission:
s = input()
t = input()

count = 0

for i in range(3):
  if s[i] == t[i]:
    count += 1

print(count)

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

count = 0

for i in range(3)

if s[i] == t[i]:
  count += 1

print(count)
Problem p02993 (python)

Fixed submission:
s = list(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
s = list(input())
if s[0] == s[1] or s[1] == s[2] or s[2] = s[3]:
  print("Good")
else:
  print("Bad")
Problem p03085 (python)

Fixed submission:
b = input()
 
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
else:
  print("G")

Buggy submission (verdict: Runtime Error):
b = int(input())
 
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
else:
  print("G")

Buggy submission (verdict: Runtime Error):
ソースコード 

Copy
Copy
b = int(input())
 
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
else:
  print("G")

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

if b == A:
  print("T")
elif b == T:
  print("A")
elif b == G:
  print("C")
else:
  print("G")
Problem p03086 (python)

Fixed submission:
s = input()
ans = 0
m = 0
for S in s:
  if S in "A":
    ans += 1
  elif S in "G":
    ans += 1
  elif S in "T":
    ans += 1
  elif S in "C":
    ans += 1
  else:
    ans = 0
  m = max(m,ans)
print(m)

Buggy submission (verdict: Runtime Error):
s = input()
ans = 0
for S in s:
  if S == "A":
    ans += 1
  elif S == "G":
    ans += 1
  elif S == "T":
    ans += 1
  elif S == "C":
    ans += 1
  else:
    ans = 0
    
print(ans)
s = input()
ans = 0
for S in s:
  if S == "A":
    ans += 1
  elif S == "G":
    ans += 1
  elif S == "T":
    ans += 1
  elif S == "C":
    ans += 1
  else:
    ans = 0
    
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans = 0
for s in S:
  if s == "A":
    ans += 1
  elif s == "G":
    ans += 1
  elif s == "T":
    ans += 1
  elif s == "C":
    ans += 1
  else:
    ans = 0
    
print(ans)
Problem p03109 (python)

Fixed submission:
s = input()
if s <= "2019/04/30":
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
s = input()
if s[5::6] <= 04 and s[8::9] <= 30:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
s = int(input())
if a[5]+a[6] > 4:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
s = input()
if a[5]+a[6] > 4:
  print("Heisei")
else:
  print("TBD")
Problem p03146 (python)

Fixed submission:
s = int(input())
l = []

while(s not in l):
  l.append(s)
  
  if s%2 == 0:
    s//=2
  else:
    s=3*s+1
print(len(l)+1)

Buggy submission (verdict: Runtime Error):
s = int(input())
l = []

while(s not in l):
  l.aplend(s)
  
  if s%2 == 0:
    s//=2
  else:
    s=3*s+1
print(len(l)=1)
Problem p03219 (python)

Fixed submission:
x,y = map(int, input().split())
print(x+y//2)

Buggy submission (verdict: Runtime Error):
x,y = (int, input().split())
print(x+y//2)
Problem p03260 (python)

Fixed submission:
a, b = map(int,input().split())
if (a == 1 and b == 2) or (a == 2 and b == 1) or (a == 2 and b == 2) or (a == 3 and b == 2) or (a == 2 and b == 3):
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
c for i in range(3)

if (a+b)+ i == 0:
  print("No")
else:
  print("Yes")
Problem p03308 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
print(abs(min(a)-max(a)))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
print(abs(min(a)-max(a))
Problem p03351 (python)

Fixed submission:
a, b, c, d = map(int,input().split())
if abs(a - b) <= d and abs(b - c) <= d or abs(a - c) <= d:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int,input().split())
if abs(a - b) =< d or abs(b - c) =< d:
  print("Yes")
else:
  print("No")
Problem p03385 (python)

Fixed submission:
print("Yes" if len(set(input())) == 3 else "No")

Buggy submission (verdict: Runtime Error):
print("Yes" if len(set(input()) == 3 else "No")